In this tutorial, you'll learn how to use the
cfdump tag, a CFML tag used to output the contents of a variable of any data type into a user-friendly and legible format.
varstring - The name of the variable to display, enclosed in pound signs.
expandboolean - Expand or collapse key/value pairs within the output. The default value is true, or expanded. false collapses all key/value pairs, allowing them to expand with a click.
labelstring - A header for the dump table output.
topnumeric - For queries and arrays, this is the number of rows to display. For structures, this is the number of nested levels to display. Supported in CF7+.
formatstring - Allows you to save the dump results to a file in HTML or text format. Available values are html and text. Supported in CF8+.
metainfoboolean - Includes the query details in the result output. Supported in CF8+.
outputstring - Where to output the dump results. Available values are browser, console, and filename. Supported in CF8+.
keysnumeric - The number of keys to display in a structure. Supported in CF8+.
hidestring - Hide column or key/value pairs. Supported in CF8+.
showstring - Show column or key/value pairs. Supported in CF8+.
showUDFsboolean - Show UDFs in dump output. Supported in CF8+.
abortboolean - Stops processing of a page. Supported in CF9+.
The following code snippets output the server scope with a table caption of "Server Scope".
<cfdump var="#server#" label="Server Scope">
writeDump(var = server, label = "Server Scope");
Lucee Script Syntax
dump(var = server, label = "Server Scope");
Dump Then Abort Page Processing
<cfdump var="#server#" abort>
Here, you learned how to use the
cfdump tag and all its attributes, including how to abort page processing for cases where you need to look at a quick data output.