Debugger - Setting breakpoints
In debugging mode the menu bar includes three additional menus--Debug,
Breakpoint, and View.
Debug menu commands allow you to control the script's flow.
Breakpoint menu commands add or remove a breakpoint.
View menu commands display different elements of the running script
(for example, local and global variables, the call stack, and breakpoints)
and evaluate expressions.
Exiting the debugger
You can leave the debugger whenever execution is stopped.
Procedure To exit the debugger, select Debug/Exit.
One useful way to debug a script is to pause it, observe its behavior and check
its state, then restart it. This is useful when you are not sure what lines of
code are causing a problem.
The debugger lets you stop execution on any line by setting breakpoints. A
breakpoint is a line in the script where execution stops, so that you can check
the script's status. During debugging, you can set breakpoints on any
executable line where you want to check the call stack (described in
"Viewing the call stack" on page 178), examine the values in one or more
variables, or just see what a script has done so far. You cannot set breakpoints
on blank lines or comment lines.