easy, and you’ll nd instructions on the installation in the ColdFusion 8 manual, Installing
and Using ColdFusion, in the chapter “Installing Integrated Technologies”, available online
at
http://livedocs.adobe.com/coldfusion/8/htmldocs/othertechnologies_11.html
.
The next step is to enable debugging in the ColdFusion Administrator (separate from
the traditional debugging), as well as to set the port on which the debugger will listen,
and also to enable ColdFusion RDS (Remote Development Services). See “Setting
up ColdFusion to Use the Debugger” in the chapter of the ColdFusion Developer’s
Guide entitled “Using the ColdFusion Debugger”. There you will also see discussion
of a minor dierence in setup for ColdFusion’s multiple instance (Multiserver) or J2EE
congurations versus the standalone Server conguration. This chapter can be found at
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=usingdebugger_1.html
.
Finally, you’ll need to congure Eclipse itself in a couple of ways, which are also
discussed in that documentation chapter. This involves conguring a connection to
your server via RDS in the ColdFusion 8 Eclipse plugins interface, conguring mappings
if ColdFusion and Eclipse are not on the same machine, and switching to the Eclipse
Debug perspective. While FusionDebug does not rely on the ColdFusion RDS feature,
the CF8 debugger does. All these steps are described in the docs mentioned above, as
well as at the top of another page in that chapter, “Using the ColdFusion Debugger”, at
http://livedocs.adobe.com/coldfusion/8/htmldocs/usingdebugger_6.html
.
Besides the Adobe documentation, there’s a very nice Adobe Dev Center article by Brian
Szoszorek, “Using the ColdFusion 8 Step-Through Debugger for Eclipse”, which walks carefully
through the conguration and setup of the Admin and the debugger, with ample screenshots.
It’s available online at
http://www.adobe.com/devnet/coldfusion/articles/debugger.html
.
I presume you’ll read those resources for setting up ColdFusion and the debugger, but I do
address some aspects of these conguration features later in the article.
First Stop: Setting a Breakpoint
Now that you’ve congured both the debugger and ColdFusion itself, and you’ve started
the debugger (as described in the docs mentioned above), open the le you wish to debug
in the Eclipse environment. You can begin by telling the tool that you want to stop execution
on a given line of CFML code. This is called setting a breakpoint. You just right-click on the
line of code in the Eclipse editor, and choose Toggle Breakpoint. Where in FusionDebug you
could right-click anywhere on the line, in the CF8 debugger, you must be sure to place the
mouse over the line number (if shown) or over the area just to the left of that (the grey area
on the left in Figure 1 below). You can also use the shortcut, Ctrl-Shift-B.
When the CFML template you’re working with is requested, and that line of code would be
executed, the program halts and the debugger interface reects that execution has halted.
It will open the le if it’s not already open, and show the line of code on which execution
has stopped. (See Figure 1)
The blue dot to the left of the line shows where a breakpoint has been set, and the blue arrow
and shading on the line indicates that control has halted on that line. Those familiar with
FusionDebug will notice that this part of the interface is the same. In fact, both debuggers
are really leveraging underlying features of the Eclipse interface and its built-in debugging
functionality. Still, without the CF8 debugger or FusionDebug, it wouldn’t be possible to
debug CFML requests using Eclipse alone.
90 Tools The Fusion Authority Quarterly Update
Comentários a estes Manuais