0

ColdFusion 8: How to cfDump Vars

ColdFusion 8

A while back I posted an undocumented way to dump the var scope. Well, ColdFusion 8 has changed its internals a bit and, as a consequence, that method no longer returns the actual var scope. This is a good reminder to never use undocumented features in production.

There is still a way to dump the var scope in ColdFusion 8:

<cfdump var="#getPageContext().getActiveFunctionLocalScope()#">

Now, this will also return the arguments and this scope which may be overkill or may be usefull. To see just the var scope use the hde attribute of cfdump and do this:

<cfdump hide="arguments,this" var="#getPageContext().getActiveFunctionLocalScope()#">

tags:
ColdFusion 8
cfZen said:
 
Nice one! Could be very handy in debugging crazy methods. ;)
 
posted 203 days ago
Add Comment Reply to: this comment OR this thread
 

Search

About Me
I am a 32-year old Web Developer specializing in ColdFusion. I live and work in downtown Washington, DC with my wife and daughter. I work for Interfolio where we help people collect, deliver and showcase their life's work. Read more About Me

2007 CFeMmy Best Newcommer winner
As voted on by fellow CF Bloggers.