dump

Alias for writeDump(): outputs the elements, variables and values of most kinds of CFML objects. Useful for debugging. Supports the named arguments var, output (browser, console or a file path), label, top, expand and abort; output="console" sends a plain-text dump to the server console and output to a file appends plain text.

dump(var [, output] [, label] [, top] [, expand] [, abort]) → returns void

Argument Reference

var any
Required

Variable to display.

output string
Default: browser

Where to send the dump: browser (default), console (server log) or a file path.
Values:
  • browser
  • console
  • filename

label string

Header for the dump output.

top numeric

Number of rows to display.

expand boolean
Default: true

Whether complex values are expanded (default true).
Values:
  • true
  • false

abort boolean
Default: false

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

Examples
Sample code invoking the dump function

Shortcut form of writeDump.

x = { a: 1, b: [1, 2, 3] };
dump(x);

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

Fork me on GitHub