Outputs the contents of a variable of any type for debugging purposes. The variable can be as simple as a string or as complex as a cfc component instance.

  <cfdump var="">

 writeDump(var = cgi, label = "CGI Scope");

cfdump Attribute Reference

var variableName

Variable to display. Enclose a variable name in pound

expand boolean
Default: true

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

label string

A string; header for the dump output.

top numeric

CF 7+ The number of rows to display. For a structure, this is the number of nested levels to display (useful for large stuctures).

format string
Default: text

CF 8+ specify whether to save the results of a cfdump to a file in text or HTML format
  • html
  • text

hide string

CF 8+ hide column or keys.

keys numeric

CF 8+ For a structure, number of keys to display.

metainfo boolean
Default: true

CF 8+ Includes information about the query in the cfdump results.
  • true
  • false

output string
Default: browser

CF 8+ Where to send the results of cfdump.
  • browser
  • console
  • filename

show string

CF 8+ show column or keys.

showUDfs boolean
Default: true

CF 8+ show UDFs in cfdump output.
  • true
  • false

abort boolean
Default: false

CF 9+ stops further processing of page
  • true
  • false

Examples sample code using the cfdump tag

Outputs a listing of all the variables in the server scope.

<cfdump var="#server#" label="Server Scope">

Outputs a listing of all the variables in the server scope.

writeDump(var = server, label = "Server Scope");

CF 9+ Instead of using a boolean for the abort-Attribute to abort after a dump, it works like that:

<cfdump var="#server#" abort>

Fork me on GitHub