Approaches To Debugging Java Cfxs; Outputting Debug Information; Using The Debugging Classes - MACROMEDIA COLDFUSION 4.5-DEVELOPING WEB Develop Manual

Developing web applications with coldfusion
Table of Contents

Advertisement

286

Approaches to Debugging Java CFXs

Java CFXs are not standalone applications that run in their own process like typical
Java applications. Rather, they are created and invoked from an existing process —
ColdFusion Server. This makes debugging Java CFXs more difficult because it is not
possible to use an interactive debugger to debug Java classes that have been loaded by
another process.
To overcome this limitation, you can use one of two techniques:
Debug the CFX while it is running within ColdFusion Server by outputting
debug information as needed. See
286
Debug the request in an interactive debugger offline from ColdFusion Server
using the special
Debugging Classes" on page 286

Outputting Debug Information

Before using interactive debuggers became the norm, programmers typically
debugged their programs by inserting output statements in their programs to indicate
information such as variable values and control paths taken. Often, when a new
platform emerges, this technique comes back into vogue while programmers wait for
more sophisticated debugging technology to be brought to the platform.
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 simply outputting debug text using the
Response.write
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
HelloColdFusion
<CFX_HelloColdFusion" NAME="Robert" DEBUG="On">
To determine if a CFX has been invoked with the
Request.debug
debug block after the tag finishes executing, you use the
method. See the

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
classes enable you to simulate a call to the
the context of the interactive debugger of a Java development environment. The three
debugging classes are:
DebugRequest
to initialize the request with custom attributes, settings, and a query.
for details.
com.allaire.cfx
method, you can also use the
CFX in debug mode, you would use the following CFML code:
method. To write debug output which will be printed in a special
"Java CFX Reference" on page 311
— An implementation of the
Developing Web Applications with ColdFusion
"Outputting Debug Information" on page
debugging classes. See
for more information.
attribute in your Java CFX. This
DEBUG
attribute, you use the
DEBUG
Response.writeDebug
for details on using these methods.
com.allaire.cfx
method of your CFX within
processRequest
interface that enables you
Request
"Using the
package. These

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 4.5-DEVELOPING WEB and is the answer not in the manual?

This manual is also suitable for:

Coldfusion 4.5

Table of Contents