Using the Interactive Debugger
123
Debugging across multiple pages
The debugger is active after a page is loaded, until you click End on the Debug
toolbar or select
Debug > End
. This lets you debug applications across multiple
HTML and CFML pages. For example, you can test the submittal of an HTML form
and its subsequent processing by a ColdFusion application page.
Stepping through code
To execute code in debug mode, you use these tools on the Debug toolbar:
•
Step Into
Proceeds to the next unit of execution in your code. Use this command
to step through code line-by-line.
If the next step is inside an included file or CFX, the debugger steps into the file.
•
Step Over
Same as Step Into, except that it executes included code but does not
trace through included code step-by-step. Does not step in included files
(CFINCLUDE, CFMODULE, or CFLOCATION) or custom tags.
•
Step Out
Steps back to the location in the original page where you entered
included code.
•
Run to Cursor
Executes to the cursor position; no
breakpoint
required. The
cursor location must be below the current position. If there are breakpoints
between the current position and the cursor, Run to Cursor stops at them.
Evaluating an expressions and setting a watch
To evaluate an arbitrary expression, when the debugger is suspended at a
breakpoint
, you use the evaluator box at the top of the Watches pane in the Debug
window. Use the evaluator when you want to know how an expression evaluates as
you step through code.
A
watch
lets you evaluate the same expression or variable each time you stop
execution. When you set a
watch
, the debugger evaluates the watched expression. If
the watched expression’s value changes, a hand icon displays.
You can use the evaluator to change values of variables, create new variables, or to
insert ColdFusion functions in your expressions.
To set a watch:
1
Select
Debug > Watches
or click the Watches button on the Debug toolbar. The
Watches pane displays.
2
Cut and paste an expression or variable into the list box at the top of the pane.
3
To find the value of the expression at the next breakpoint or line where the
Debugger stops, select Evaluate.
The Evaluator window shows the results of the evaluation at the current point in
processing.
Содержание ColdFusion Server 5
Страница 18: ...xviii About This Book...
Страница 26: ...8 Chapter 1 Setting Up the Product...
Страница 42: ...24 Chapter 2 Configuring Browsers and Servers...
Страница 60: ...42 Chapter 3 Exploring the Workspace...
Страница 100: ...82 Chapter 6 Editing Pages...
Страница 126: ...108 Chapter 7 Using Web Development Languages...
Страница 212: ...194 Chapter 13 Customizing the Development Environment...
Страница 320: ...302 Glossary...