View all Session Variables

I have just taken over a ColdFusion project and I need to know what session variables have been established.  What is a good way to check?  
LVL 5
trifecta2kAsked:
Who is Participating?
 
gdemariaConnect With a Mentor Commented:

 oops, type-o, sorry..

<cfdump var="#session#">

 This will dump all session variables to the page in a hierarchical HTML format.

0
 
gdemariaCommented:

<cfdump var="#session"#>
0
 
stu215Systems AnalystCommented:
<cfdump var="#session#"><cfabort>
Should work...

You can also use the collection attribute of cfloop to loop over the keys in the session scope.
0
 
stu215Systems AnalystCommented:
Heres a cfloop example with collection too if ya like ::

<CFLOOP COLLECTION="#session#" ITEM="ThisKey">
<CFOUTPUT>#ThisKey#:</CFOUTPUT>
<CFIF #IsSimpleValue(session[ThisKey])#>
<CFOUTPUT>#session[ThisKey]#</CFOUTPUT>
<CFELSE>
Complex Value
</CFIF><BR>
</CFLOOP>  
0
 
trifecta2kAuthor Commented:
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.