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 [, expand] [, format] [, abort] [, hide] [, keys] [, label] [, metainfo] [, output] [, show] [, showUDfs] [, top]) → returns void

writeDump Argument Reference

var variableName
Required

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

expand boolean
Default: true

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

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

hide string

hide column or keys.

keys numeric

For a structure, number of keys to display.

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

output string
Default: browser

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

show string

show column or keys.

showUDfs boolean
Default: true

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

top numeric

The number of rows to display.

Compatibility

Lucee:

In Lucee there is a shortcut. Simply use dump()

Examples sample code invoking the writeDump function


Dump Server Scope

writeDump(server);

Fork me on GitHub