Approaches To Debugging Java Cfx Tags; Outputting Debugging Information; Debugging In A Java Ide - MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual

Developing coldfusion mx applications
Table of Contents

Advertisement

Approaches to debugging Java CFX tags

Java CFX tags are not stand-alone applications that run in their own process, like typical Java
applications. Rather, they are created and invoked from an existing process. This makes
debugging Java CFX tags more difficult, because you cannot use an interactive debugger to debug
Java classes that have been loaded by another process.
To overcome this limitation, you can use one of the following techniques:
Debug the CFX tag while it is running within ColdFusion MX by outputting the debug
information as needed.
Debug the CFX tag using a Java IDE (Integrated Development Environment) that supports
debugging features, such as setting breakpoints, stepping through your code, and displaying
variable values.
Debug the request in an interactive debugger offline from ColdFusion MX using the special
com.allaire.cfx debugging classes.

Outputting debugging 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
develop for the platform.
If you need to debug a Java CFX tag while running against a live production server, this is the
technique you must use. In addition to outputting debugging text using the
method, you can also call your Java CFX tag with the
the CFX tag that the request is running in debug mode and therefore should output additional
extended debugging information. For example, to call the
debugging mode, use the following CFML code:
<cfx_HelloColdFusion name="Robert" debug="On">
To determine whether a CFX tag is invoked with the
method. To write debugging output in a special debugging block after the tag finishes executing,
use the
Response.writeDebug
"ColdFusion Java CFX Reference,"

Debugging in a Java IDE

You can use a Java IDE to debug your Java CFX tags. This means you can develop your Java CFX
tag and debug it in a single environment.
To use a Java IDE to debug your CFX tag:
Start your IDE.
1
In the project properties (or your IDE's project setting), make sure your CFX class is in the
2
web_root\WEB-INF\classes directory or in the system classpath.
Make sure the libraries cf_root\lib\cfx.jar and cf_root\runtime\lib\jrun.jar are included in your
3
classpath.
In your project settings, set your main class to jrunx.kernel.JRun and application parameters to
4
-start default
method. For information on using these methods, see
in CFML Reference.
.
attribute. This attribute flags
debug="On"
HelloColdFusion
attribute, use the
debug

Approaches to debugging Java CFX tags

Response.write
CFX tag in
Request.debug
Chapter 5,
259

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Coldfusion mx

Table of Contents