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 605 days ago
Add Comment Reply to: this comment OR this thread
 

Search

Twitter
You should follow me on Twitter here
About Me
I am a 34-year old Web Developer specializing in ColdFusion. I live and work in downtown Washington, DC with my wife and two daughters. Read more About Me

2007 CFeMmy Best Newcommer winner
As voted on by fellow CF Bloggers.
CFinNC - Carolina ColdFusion / Flex / Air Conference - Oct 17-18, 2009