Paul Alkema

Discussions on Web Development and Security

Paul Alkema

Dump or list all ColdFusion Variables in all scopes.

May 16, 2011 · 116 Comments

Dump or list all ColdFusion Variables in all scopes.

On some occasions you may run into issues where you need a variable but your not sure what scope it’s in. Well I’ve found the code below extremely helpful for finding what scope the variable I’m looking for is in.

	<cfdump var="#getPageContext().getBuiltInScopes()#"/>

Basically the function, “getPageContext().getBuiltInScopes()” will list all variables in all scopes.

Enjoy! :)

Tags: ColdFusion