Everything you didn't know about cfdump
My tip this morning about the TOP attribute on the cfdump tag has been pretty popular, which makes me wonder what else people don't know about the cfdump tag. In ColdFusion 7 it was just a variable, a label, top, and whether the dump was expanded or not. ColdFusion 8 added the show, format, hide, keys, metainfo, output, and showUDFs attributes.
New ColdFusion 8 cfdump attributes
- format: Use with the output attribute to specify whether to save the results of a cfdump to a file in text or HTML format.
- hide: For a query, this is a column name or a comma-delimited list of column names. For a structure, this is a key or a comma-delimited list of keys.
- keys: For a structure, the number of keys to display.
- metainfo: For use with queries only. Includes information about the query in the cfdump results, including whether the query was cached, the execution time, and the SQL. You must specify metainfo="no" to exclude this information from the query result.
- output: Where to send the results of cfdump. The following values are valid: browser, console, filename (the full file path of the file that should be written).
- show: For a query, this is a column name or a comma-delimited list of column names. For a structure, this is a key or a comma-delimited list of keys.
- showUDFs: "yes" includes UDFs, with the methods collapsed, "no" excludes UDFs.
I use the format, show, and showUDFs all the time. The LiveDocs are your friend. Read all of that and more at the cfdump page in the ColdFusion 8 LiveDocs.
3 Comments
Timothy wrote on 09/24/09 7:25 AM
Nice... There are quite a few features that I didn't know about... BTW... to add to your post, CF9 is adding an abort attribute...Daniel Short wrote on 09/24/09 8:12 AM
Yep, that means that I have to rework my dump and abort snippet. These types of little changes are what make cf more and more enjoyable to use.
Rudi Shumpert wrote on 09/23/09 12:45 PM
Good post. Very useful information indeed. Thanks!