How To Get All Session Variables And Values?

Session variables are very useful, but you must use them carefully because they could spend too much of your memory resources. It could be useful to find out what are current session variables and its values in some scenarios. You can do it with code like this: