↑
Main Page
Stepping through the code
Figure 14-19
You also have many options to clear a breakpoint. First, you can click on the
B
or
F
in the left margin
until it turns back to a dash. You can also right-click on the Breakpoints view to call up a context menu
where you can select whether to clear a hard breakpoint, a future breakpoint, all hard breakpoints, or all
future breakpoints.
The last method is to use the command line interface again and use the
/clear
command (to clear hard
breakpoints) or the
/fclear
command (to clear future breakpoints). These commands accept the same
arguments as
/break
and
/fbreak
: the filename and the line number to clear. Once again, the full file-
name isn’t necessary, so the following two lines accomplish the same thing:
/clear ThrowExample.htm 7
/clear Thr 7
You can clear all hard breakpoints using the
/clear-all
command and all future breakpoints using the
/fclear-all
command.
Stepping through the code
As with breakpoints, you have numerous ways to step through your source code. The simplest way is to
use the debug toolbar (Figure 14-20), which is prominently displayed at the top of the Venkman window.
Figure 14-20
The debug toolbar is made up of five buttons: Stop, Continue, Step Over, Step Into, and Step Out. The
Stop button stops the currently active script without executing any further lines of code. If no code is
being executed, three white dots appear over the Stop button to indicate that the debugger is not currently
When you clear a hard breakpoint, it automatically becomes a future breakpoint.
That means you must first clear all hard breakpoints and then all future breakpoints
to effectively eliminate all breakpoints.
440
Chapter 14
17_579088 ch14.qxd 3/28/05 11:41 AM Page 440
Free JavaScript Editor
Ajax Editor
©
→