CFDUMP even better in CF8
The CFDUMP tag allows you to get the elements, variables, and values of most kinds of ColdFusion scopes or objects. It's been a great debugging tool since it arrived in with ColdFusion MX (ColdFusion 6). You could display the contents of queries, scopes like CGI, and supporting systems like the operation system and the web server. It is also great for displaying results from CFHTTP, CFERROR and other CF tags that return data.
With the release of ColdFusion 8, CFDUMP gains a number of new features.
To use CFDUMP just include the following code in your page and adjust parameters. The only required parameter is var which can be a query, a scope, or any other object. Wrap in pound signs.
- Format - Output can be HTML as before in a collapsible HTML table or you can output it as plain text much like you see in ColdFusions debugging output.
- Hide | Show - You can now display partial lists by hiding or showing a limited set of elements
- Keys- Number of keys in a structure to show.
- Metainfo - Displays query information including whether it was cached, the execution time, and the SQL script used.
- Output - Allows you to display to a console (JRun console) or write to a log file or display to the browser as in the past.
- showUDFs - Lists available user defined functions.
- Top - Number of rows to show so you can show only a few rows of a query or array.
<cfdump
var = "#variable#"
expand = "yes|no"
format = "text|html"
hide = "columns|keys"
keys = "number of keys to display for structures"
label = "text"
metainfo = yes|no"
output = "browser|console|file"
show = "columns|keys"
showUDFs = "yes|no"
top = "number of rows|number of levels">

There are no comments for this entry.
[Add Comment]