writeDump

Outputs the elements, variables and values of most kinds of CFML objects. Useful for debugging. You can display the contents of simple and complex variables, objects, components, user-defined functions, and other elements. Equivalent to the cfdump tag, useful in cfscript.

writeDump(var [, output] [, format] [, abort] [, label] [, metainfo] [, top] [, show] [, hide] [, keys] [, expand] [, showUDFs]) → returns void

Argument Reference

var variableName
Required

Variable to display. Enclose a variable name in pound
signs.

output string
Default: browser

Where to send the results of cfdump.
Values:
  • browser
  • console
  • filename

format string
Default: text

specify whether to save the results of a cfdump to a file in text or HTML format
Values:
  • html
  • text

abort boolean
Default: false

Boolean value to immediately abort after displaying the dump.
Values:
  • true
  • false

label string

A string; header for the dump output.

metainfo boolean
Default: true

Includes information about the query in the cfdump results.
Values:
  • true
  • false

top numeric

The number of rows to display.

show string

show column or keys.

hide string

hide column or keys.

keys numeric

For a structure, number of keys to display.

expand boolean
Default: true

Yes: In Internet Explorer and Mozilla, expands views
Values:
  • true
  • false

showUDfs boolean
Default: true

show UDFs in cfdump output.
Values:
  • true
  • false

Compatibility

Lucee:

In Lucee there is a shortcut. Simply use dump(). Important: If using positional arguments, their order is different with Lucee (https://luceeserver.atlassian.net/browse/LDEV-2045).

Examples
Sample code invoking the writeDump function

writeDump(server);

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub