While surfing the web, I found the most useful little snippet of code that can help quickly troubleshoot and track down session and application variables. Just throw the code on an .aspx page and view in browser while you have your application running. A little F5 here and there and you can easily keep up with what's going on with your session and application level variables.
Just throw this code on an aspx page and you're good to go...
Session Variables - <% =Session.Contents.Count %> Found<br><br>
<%
Dim item, itemloop
For Each item in Session.Contents
If IsArray(Session(item)) then
For itemloop = LBound(Session(item)) to UBound(Session(item))
%>
<% =item %> <% =itemloop %> <font color=blue><% =Session(item)(itemloop) %></font><BR>
<%
Next
Else
%>
<% =item %> <font color=blue><% =Session.Contents(item) %></font><BR>
<%
End If
Next
%>
<hr>
Application Variables - <% =Application.Contents.Count %> Found<br><br>
<%
For Each item in Application.Contents
If IsArray(Application(item)) then
For itemloop = LBound(Application(item)) to UBound(Application(item))
%>
<% =item %> <% =itemloop %> <font color=blue><% =Application(item)(itemloop) %></font><BR>
<%
Next
Else
%>
<% =item %> <font color=blue><% =Application.Contents(item) %></font><BR>
<%
End If
Next
%>
</font>
Then, you can quickly clear them by using the following:
<%
Session.Abandon
Application.Contents.RemoveAll()
%>
This Code Snippet was originally found at: <http://www.powerasp.net/content/new/displaying-session-and-application-variables.asp>