Admin User     Feb,08 2017

CFDUMP Enhancements

Coldfusion has a beauty and that is CFDUMP. But very few of CFers know about enhancements made in CFDUMP that provides control over what to show and what not to in a dump result. You can indicate columns of query or keys of structure to show. It has show/hide attribute to do so.

<cfdump var="#myquery#" show="col1,col2"><cfdump var="#myquery#" hide="col1,col2"><cfdump var="#mystructure#" show="key1,key2"><cfdump var="#mystructure#" hide="key1,key2">

  • How many Keys to display in dump result.

<cfdump var="#mystructure#" keys="4">

  • We can control whether to show output to browser, console, or a file. It will be default to browser.console will be used to runtime log file if CF running as a service.

<cfdump var="#mystructure#" OUTPUT="browser|console|filename">

  • Format is new attribute and that has two attributes.

<cfdump var="#mystructure#" FORMAT="html|text">

  • Normally dump of query shows more information than actual data. Like number of records, queryparam values and some meta information. We can prevent this using a new attribute.

<cfdump var="#myquery#" METAINFO="no">