User Guide

Table Of Contents
434 Chapter 18: Debugging and Troubleshooting Applications
Application page selections
ColdFusion displays two buttons at the bottom of each page, as described in the following table:
Debug pane features
The debug pane has the following features:
You can expand and collapse each debugging information category, such as Exceptions, by
clicking on the plus or minus sign (+ or -) in front of each category heading. You can also
expand and collapse each scope data type display in the Scoped Variables section.
The top of the debug pane displays the URL of the application page being debugged (as
identified by the cgi.script_name variable). Click this link to refresh the page and display the
debugging information that results. (You can also refresh the page and debugging information
by using your browsers Refresh button or key.)
The debug pane also displays a box where you can enter a page pathname or URL. When you
click the Go button, ColdFusion processes the page and the debug pane is updated with the
debugging information for the new page.
Controlling debugging information in CFML
The following sections describe how you can use CFML tags and functions to display or hide
debugging and tracing information.
Generating debugging information for an individual query
In the Administrator, the
cfquery tag debug attribute overrides the Database Activity setting on
the Debugging Settings page. The
debug attribute has an effect only when debugging output is
enabled on the Debugging Settings page, as follows:
If Database Activity is selected in the Administrator, specify debug="No" to prevent
ColdFusion from displaying the query’s SQL and statistics in the debugging output.
If Database Activity is not selected in the Administrator, specify debug="Yes" or debug to
have ColdFusion display the querys SQL and statistics in the debugging output.
For example, if Database Activity is not selected in the Administrator, you can use the following
code to show the query execution time, number of records returned, ColdFusion page,
timestamp, and the SQL statement sent to the data source for this query only:
<cfquery name="TestQuery" datasource="cfdocexamples" debug>
SELECT * FROM TestTable
</cfquery>
Button Description
Debug This page Tells ColdFusion to display the debugging information for the selected frame.
Refreshes the debug pane if you select it for the current frame (or the
application does not use frames).
Floating/Docked
debug pane
Toggles the display between a floating window and a pane docked to the left
of the selected frame.