Sam Farmer

Growing up I never imagined I would play bass guitar for the Dave Matthews Band. And indeed it never happened.

But I have become passionate about making software.

ColdFusion 8: How to cfDump Vars

September 5, 2007

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()#">


No Comments

Some comments have been lost over the years due to moving hosts.

More


More blog entries that I have written.

Code coloring by PRISM.