CFLib.org – Common Function Library Project

DebugVars([scopes])

Last updated April 30, 2003

author

Eric C. Davis

Version: 1 | Requires: CF6 | 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>
blog comments powered by Disqus

Search CFLib.org


Latest Additions

Kevin Cotton added
date2ExcelDate
May 5, 2016

Raymond Camden added
CapFirst
April 25, 2016

Chris Wigginton added
loremIpsum
January 18, 2016

Gary Stanton added
calculateArrival...
November 19, 2015

Sebastiaan Naafs - van Dijk added
getDaysInQuarter
November 13, 2015

Created by Raymond Camden / Design by Justin Johnson