Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 393

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Developing CFML Applications
Entry
[UDF End]
[MyStatus = Success]
GetRecords UDF call has completed
Using tracing
As its name indicates, the
cftrace
do any of several things:
• You can time the execution of a tag or code section. This capability is useful for tags and operations that can take
substantial processing time. Typical candidates include all ColdFusion tags that access external resources, including
,
,
cfquery
cfldap
cfftp
before and after the code you want to time.
• You can display the values of internal variables, including data structures. For example, you can display the raw
results of a database query.
• You can display an intermediate value of a variable. For example, you could use this tag to display the contents of
a raw string value before you use string functions to select a substring or format it.
• You can display and log processing progress. For example, you can place a
application or before critical tags or calls to critical functions. (Doing this could result in massive log files in a
complex application, so use this technique with care.)
• If a page has many nested
the execution flow. When you do this, use the condition variable in the message or
• If you find that the ColdFusion server is hanging, and you suspect a particular block of code (or call to a cfx tag,
COM object, or other third-party component), you can place a
log entry and exit.
Calling the cftrace tag
The
tag takes the following attributes. All attributes are optional.
cftrace
tag is designed to help you trace the execution of your application. It can help you
,
, and so on. To time execution of any tag or code block, call the
cffile
and
tags you can place
cfif
cfelseif
Last updated 1/20/2012
Meaning
Value of the
cftrace
tag
category
Name and value of the variable specified by the
tag
attribute. If the variable is a complex data type,
var
such as an array or structure, the log contains the variable
value and the number of entries at the top level of the
variable, such as the number of top-level structure keys.
The
cftrace
tag
text
attribute with any variables
replaced with their values.
call at the head of pages in your
cftrace
tags in each conditional block to trace
cftrace
attribute.
var
tag before and after the suspect code, to
cftrace
388
attribute.
cftrace
tag
cftrace

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents