Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 403

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Developing CFML Applications
Run the page that you want to debug before setting any breakpoints to compile it before debugging it. This improves
performance during debugging. You cannot set a breakpoint in a file that is not part of a project.
In Eclipse, open the file in which you want to set a breakpoint.
1
2
While highlighting the line where you want to set the breakpoint, do one of the following:
• Double-click in the marker bar that appears to the left of the editor area.
• Right click, and then select Toggle Breakpoint.
• Press Alt+Shift+B.
A blue dot appears before the line on which you set the breakpoint.
Also, you can view a list of breakpoints set in the current Eclipse project in the Breakpoints panel.
ColdFusion breakpoints have four states in the Eclipse debugger:
• Enabled and Valid - This is a breakpoint at a valid location. It is represented by a solid blue circle and stops code
execution when encountered.
• Unresolved - ColdFusion sets the breakpoint for the page that is loaded in its memory. If you modify the page
and do not execute it, the source is not in sync with the page that ColdFusion sees on the server. In this situation,
ColdFusion may consider the line where you want to set breakpoint to be invalid. However, you have not yet
executed the page; when you do so, that line may be valid. This type of breakpoint is represented by a question
mark (?) icon.
For performance reasons, ColdFusion does not try to resolve unresolved breakpoints every time you execute the
page. It tries to resolve them when you modify the page and execute it. If you think that the line at which
ColdFusion shows an unresolved breakpoint is valid, delete the breakpoint and set it again.
• Invalid - If ColdFusion determines that the CFML that you edit in Eclipse is the same as the CFML in its
memory, and that the breakpoint you have set is at an invalid line, the breakpoint appears as a red X.
• Disabled.
Executing code line by line
You can use the Step Into, Step Over, and Step Return buttons to proceed through your CFML application line by line.
Use Step Into to proceed into included files, such as UDFs or CFCs. Use the Step Over button to proceed through your
CFML application, bypassing included files, such as UDFs or CFCs. Use the Step Return button to return to the
original page from which you entered the included file, such as UDFs or CFCs.
For the stepping process to work properly, clear the cache of compiled classes. To do so, recompile all CFML pages
compiled with an earlier version of ColdFusion. In large files, you might find that stepping and breakpoints are slow.
To improve performance, in Eclipse, select Windows > Preferences > ColdFusion > Debug Settings and deselect all
scopes for which you do not require information.
Avoid using Step In on CFML instructions such as the
Over. You can use Step In for UDFs, CFCs, custom tags, and included files.
When stepping into functions, tags, and files, Eclipse expects the file to be displayed in one of the open projects. The
file that you are stepping in must be in an open Eclipse project.
Sometimes Eclipse 3.2.1 does not show the stack trace, and step buttons are disabled, even though the debugger has
stopped at a line. To enable the step buttons, click the debugger server instance in the Debug window. To see the stack
trace, click either Step In or Step Out.
tag. Step In is more performance intensive than Step
cfset
Last updated 1/20/2012
398

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents