Using The Debugging Classes - MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual

Table of Contents

Advertisement

Approaches to Debugging Java CFXs
If you need to debug a Java CFX while running against a live production server, this is
the technique you must use. In addition to outputting debug text using the
Response.write
attribute. This attribute flags the CFX that the request is running in debug mode and
therefore should output additional extended debug information. For example, to call
the
<cfx_HelloColdFusion" name="Robert" debug="On">
To determine whether a CFX is invoked with the
Request.debug
finishes executing, use the
methods, see the CFML Reference.

Using the debugging classes

To develop and debug Java CFXs in isolation from the ColdFusion Server, you use
three special debugging classes that are included in the
These classes enable you to simulate a call to the
CFX within the context of the interactive debugger of a Java development
environment. The three debugging classes are:
To use the debugging classes:
1
2
3
4
After you implement a
Java CFX using an interactive, single-step debugger. Just specify your Java CFX class
as the
method, you can also call your Java CFX tag with the
CFX in debug mode, use the following CFML code:
HelloColdFusion
method. To write debug output in a special debug block after the tag
An implementation of the
DebugRequest
initialize the request with custom attributes, settings, and a query.
An implementation of the
DebugResponse
to print the results of a request once it has completed.
An implementation of the
DebugQuery
initialize a query with a name, columns, and a data set.
Create a
method for your Java CFX class. You use this method as the testbed
main
for your CFX.
Within the
method, initialize a
main
if appropriate, with the attributes and data you want to use for your
DebugQuery
test.
Create an instance of your Java CFX and call its
in the
DebugRequest
Call the
DebugResponse.printResults
request, including content generated, variables set, queries created, and so forth.
main
class, set breakpoints as appropriate, and begin debugging.
main
Response.writeDebug
Query
DebugRequest
and
DebugResponse
method to output the results of the
method as described previously, you can debug your
attribute, use the
debug
method. For details on using these
com.allaire.cfx
processRequest
interface that enables you to
Request
interface that enables you
Response
interface that enables you to
and
DebugResponse
processRequest
objects.
399
debug="On"
package.
method of your
, and a
method, passing

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 5

Table of Contents