User Guide

Table Of Contents
440 Chapter 18: Debugging and Troubleshooting Applications
Note: If you specify inline trace output, and a cftrace tag is inside a cfsilent tag block, ColdFusion
does not display the trace information in line, but does include it in the standard debugging display.
The following cftrace tag displays the information shown in the example output and log entry
in the About the cftrace tag” section:
<cftrace abort="False" category="UDF End" inline = "True" text = "GetRecords
UDF
call has completed" var = "MyStatus">
Using the cftimer tag to time blocks of code
The cftimer tag displays execution time for a specified section of CFML code.
Using timing
Use this tag to determine how long it takes for a block of code to execute. This is particularly
useful when ColdFusion debugging output indicates excessive execution time, but does not
pinpoint the long-running block of code.
To use this tag, you must enable debugging in the ColdFusion MX Administrator Debugging
Settings page. In the Debugging Settings page, you must also specifically enable usage of the
cftimer tag by checking the Timer Information check box.
Tip: If you enable debugging for the cftimer tag only and display timing information in an HTML
comment, you can generate timing information without disturbing production users.
type A ColdFusion logging severity type. The inline trace display and dockable.cfm
output format show a symbol for each type. The default debugging output shows
the type name, which is also used in the log file. The type name must be one of
the following:
Information (default)
Warning
Error
Fatal Information
var The name of a single variable that you want displayed. This attribute can specify a
simple variable, such as a string, or a complex variable, such as a structure name.
Do not surround the variable name in number signs.
Complex variables are displayed in inline output in
cfdump format; the debugging
display and log file report the number of elements in the complex variable,
instead of any values.
You can use this attribute to display an internal variable that the page does not
normally show, or an intermediate value of a variable before the page processes it
further.
To display a function return value, put the function inside the message. Do not
use the function in the
var attribute, because the attribute cannot evaluate
functions.
Attribute Purpose