1

Is there any tool or sth to view Session with all key values elements 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,

2 Answers 2

1

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();
}
Sign up to request clarification or add additional context in comments.

Comments

1

You can use the Watch window. Just type in "Session", hit enter and navigate through the tree.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.