CFLib.org – Common Function Library Project

DebugVars([scopes])

Last updated April 30, 2003
Download UDF

author

Eric C. Davis                                     Eric C. Davis

Version: 1 | Requires: ColdFusion MX | Library: UtilityLib

Description:
Output more extensive debugging information than just the CF debug info, using the <cfdump> tag. It fits easiest at the end of the template, but can be placed anywhere.

Return Values:
Returns a string.

Example:

<cfset DebugInfo = DebugVars("url") />
<cfoutput>
#DebugInfo#
</cfoutput>

Parameters:

Name Description Required
scopes Scopes to display. Must be one of: variables,form,url,request,cookie,session,client,application,server,cgi No

Full UDF Source:

<!---
Outputs a load of variables for debugging purposes.

@param scopes      Scopes to display. Must be one of: variables,form,url,request,cookie,session,client,application,server,cgi (Optional)
@return Returns a string.
@author Eric C. Davis (cflib@10mar2001.com)
@version 1, April 30, 2003
--->

<cffunction name="debugVars" output="true" returntype="string" access="public" hint="Output more extensive debugging information than just the CF debug info" displayname="DebugVars()">
<cfargument name="scopes" required="false" default="variables,form,url,request,cookie,session,client,application,server,cgi" hint="Scopes to be dumped" type="string" displayname="Scopes" />
<cfsavecontent variable="returnVar">
<cfloop list="#arguments.scopes#" index="myScope" delimiters=",">
<cftry>
<cfdump label="#Trim(myScope)#" var="#Evaluate(Trim(myScope))#" />
<cfcatch>
<cfoutput>
#cfcatch.Message#
</cfoutput>
</cfcatch>
</cftry>
</cfloop>
</cfsavecontent>
<cfreturn returnVar />
</cffunction>

Search CFLib.org


Latest Additions

Jose Diaz-Salcedo Jose Diaz-Salcedo added
cfRssFeed
2 day(s) ago

Raymond Compton Raymond Compton added
structBlend
23 day(s) ago

Duncan Duncan added
IsZIPUK
23 day(s) ago

Todd Sharp Todd Sharp added
getTagContentAll
29 day(s) ago

Gerald Guido Gerald Guido added
ListReturnDuplicat...
1 month(s) ago

Created by Raymond Camden / Design by Justin Johnson