ASP.Net session debugger
Is there any tool or sth to view Session with all key values elements开发者_Go百科 in debug mode?
I can use immediate Window to check but I need to know Key. I would like to have clear view of what is actually in the session,
Using the regular debugging tools, or perhaps a small custom output form etc you can easily loop through each session value using the Keys property of the session object in a for loop printing each value...
that would retrieve all the values currently stored in session.
Some code (pseudo-ish):
foreach (string key in Session.Keys)
{
// Session[key].ToString();
}
You can use the Watch window. Just type in "Session", hit enter and navigate through the tree.
精彩评论