Name
The ColdFusion debugging output that you configure in the Administrator displays whenever an HTML request completes. It represents the server conditions at the end of the request. For information on displaying debugging information while a request is processed, see Using the cftrace tag to trace execution.
The dockable.cfm debugging output format shows the debugging output in collapsed format. The next sections show each of the debugging sections and describe how you can use the information they display.
General debugging information
ColdFusion displays general debugging information. In the classic.cfm output format, the information appears at the top of the debugging output and has no heading.
The general debugging information includes the following values. The table lists the names used in the classic output template view.
|
Description |
---|---|
ColdFusion |
The ColdFusion version. |
Template |
The requested template. (In the dockable. cfm format, this appears in the Page Overview section and is called Page.) |
TimeStamp |
The time the request was completed. (In the dockable. cfm format, this appears in the Page Overview section and is called Date.) |
Locale |
The locality and language that determines how information is processed, particularly the message language. |
User Agent |
The identity of the browser that made the HTTP request. |
Remote IP |
The IP address of the client system that made the HTTP request. |
Host Name |
The name of the host running the ColdFusion server that executed the request. |
Execution Time
The Execution Time section displays the time required to process the request. It displays information about the time required to process all pages required for the request, including the Application. cfc , Application.cfm, and OnRequestEnd.cfm pages, if used, and any CFML custom tags, pages included by the cfinclude tag, and any ColdFusion component (CFC) pages.
To display execution time for a specific block of code, use the cftimer_ tag._
You can display the execution time in two formats:
- Summary
- Tree
Execution time decreases substantially between the first and second time you use a page after creating it or changing it. The first time ColdFusion uses a page it compiles the page into Java bytecode, which the server saves and loads into memory. Subsequent uses of unmodified pages do not require recompilation of the code, and therefore are substantially faster.
Summary execution time format
The summary format displays one entry for each ColdFusion page processed during the request. If a page is processed multiple times it appears only once in the summary. For example, if a custom tag gets called three time in a request, it appears only once in the output.
The following table describes the display fields:
Column |
Description |
---|---|
Total Time |
The total time required to process all instances of the page and all pages that it uses. For example, if a request causes a page to be processed two times, and the page includes another page, the total time includes the time required to process both pages twice. |
Avg Time |
The average time for processing each instance of this page and the pages that it uses. The Avg Time multiplied by the Count equals the Total Time. |
Count |
The number of times the page is processed for the request. |
Template |
The path name of the page. |
The page icon indicates the requested page.
Any page with an average processing time that exceeds the highlight value that you set on the Debugging Settings page in the ColdFusion Administrator appears in red.
The next to last line of the output displays the time that ColdFusion took to parse, compile, and load pages, and to start and end page processing. This image is not included in the individual page execution times. The last line shows the sum of all the time it took to process the request.
Tree execution time format
The tree execution time format is a hierarchical, detailed view of how ColdFusion processes each page. If a page includes or calls second page, the second page appears below and indented relative to the page that uses it. Each page appears once for each time it is used. Therefore, if a page gets called three times in processing a request, it appears three times in the tree. Therefore the tree view displays both processing times and an indication of the order of page processing.
As in the summary view, the execution times (in parentheses) show the times to process the listed page and all pages required to process the page, that is, all pages indented below the page in the tree.
By looking at this output in this image you can determine the following information:
- ColdFusion took 0 ms to process an Application.cfm page as part of the request.
- The requested page was tryinclude.cfm. It took 203 ms to process this page and all pages required to execute it. The code directly on this page took 71 milliseconds (203 - 93 - 16 - 23) to process.
- The mytag2.cfm page was processed three times. All processing took 93 milliseconds, and the average processing time was 31 milliseconds. (This page does not call any other pages.)
- The mytag1.cfm page was processed two times. All processing took 78 milliseconds, and the average processing time was 39 milliseconds. This time included the time to process mytag2. cfm (this tag calls the mytag2 custom tag); therefore, the code directly on the page took an average of 8 milliseconds and a total of 16 milliseconds to process.
- The includeme .cfm page took about 62 ms to process. This processing time includes the time to process the mytag1.cfm, and therefore also the time to process mytag2. cfm once. Therefore the code directly on the page took 23 milliseconds (62-39) to process.
- ColdFusion took 125 ms for processing that was not associated with a specific page.
- The total processing time was 328 milliseconds, the sum of 125 + 203.
Database Activity
In the Administrator, when Database Activity is selected on the Debugging Settings page, the debugging output includes information about database access.
SQL Queries
The SQL Queries section provides information about tags that generate SQL queries or result in retrieving a cached database query: cfquery , cfinsert , cfgridupdate , and cfupdate .
The output displays the following information:
- Page on which the query is located.
- The time when the query was made.
- Query name.
- An indicator if the result came from a cached query.
- SQL statement, including the results of processing any dynamic elements such as CFML variables and cfqueryparam tags. This information is useful because it shows the results of all ColdFusion processing of the SQL statement.
- Data source name.
- Number of records returned; 0 indicates no match to the query.
- Query execution time.
- Any query parameters values from cfqueryparam tags.
Stored Procedures
The stored procedures section displays information about the results of using the cfstoredproc tag to execute a stored procedure in a database management system.
The output displays the following information:
- Stored procedure name
- Data source name
- Query execution time
- Page on which the query is located.
- The time when the query was made.
- A table displaying the procedure parameters sent and received, as specified in the cfprocparam tags, including the ctype , CFSQLType, value, variable, and dbVarName attributes. The variable information for OUT and INOUT parameters includes the returned value.
- A table listing the procedure result sets returned, as specified in the cfprocresult tag.
Exceptions
In the Administrator, when Exception Information is selected on the Debugging Settings page, the debugging output includes a list of all ColdFusion exceptions raised in processing the application page.
The exception information includes information about any application exceptions that are caught and handled by your application code or by ColdFusion.
Exceptions represent events that disrupt the normal flow of an application. You should catch and, whenever possible, recover from foreseeable exceptions in your application, as described in Handling Errors. However, you might also want to be alerted to caught exceptions when you are debugging your application. For example, if a file is missing, your application can catch the cffile exception and use a backup or default file instead. If you enable exception information in the debugging output, you can immediately see when this happens.
Trace points
In the Administrator, when Tracing Information is selected on the Debugging Settings page, the debugging output includes the results of all cftrace tags, including all tags that display their results inline. Therefore, the debugging output contains a historical record of all trace points encountered in processing the request.
For more information on using the cftrace tag, see Using the cftrace tag to trace execution.
Scope variables
In the Administrator, when the Variables option and one or more variable scopes are selected on the Debugging Settings page, the debugging output displays the values of all variables in the selected scopes. The debugging output displays the values that result after all processing of the current page.
By displaying selected scope variables you can determine the effects of processing on persistent scope variables, such as application variables. This can help you locate problems that do not generate exceptions.
The Form, URL, and CGI scopes are useful for inspecting the state of a request. They let you inspect parameters that affect page behavior, as follows:
- URL variables Identify the HTTP request parameters.
- Form variables Identify the form fields posted to an action page.
- CGI variables Provide a view of the server environment following the request.Similarly, the Client, Session, Application, and Server scope variables show the global state of the application, and can be useful in tracing how each page affects the state of the ColdFusion persistent variables.
Using the dockable.cfm output format
The dockable.cfm output format has several features that are not included in the classic.cfm debugging display.
Application page selections
ColdFusion displays two buttons at the bottom of each page, as described in the following table:
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. |
Debug pane features
The debug pane has the following features:
- You can expand and collapse each debugging information category, such as Exceptions, by clicking 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 browser's Refresh button or key.)
- The debug pane also displays a box where you can enter a page path 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.