Acrobat JavaScript Tools
Debugger Buttons
2
Interrupt
The
Interrupt
button halts execution of the current script. When clicked, it appears in red,
which indicates that it has been activated and causes execution to stop at the beginning of
the next script that is run. If this occurs, the
Interrupt
button is automatically deactivated
and returns to its green color. It must be activated again in order to interrupt another script.
Quit
The
Quit
button terminates the debugging session and closes the debugger.
Step Over
The
Step Over
button executes a single instruction, and if it is a function call, it executes
the entire function in a single step, rather than stepping into the function. For example, the
position indicator (yellow arrow) in the debugger is to the left of a function call, as shown
below in
Figure 2.11:
F
IGURE
2.11
Position Indicator at a Function Call
Excecution is currently halted before the call to
callMe()
. Assuming that there are no
errors or breakpoints in
callMe()
, clicking
Step Over
executes the entire
callMe()
function, and advances the position indicator to the next script instruction following the
function call.
If the statement at the position indicator does not contain a function call,
Step Over
simply
executes that statement.
Step Into
The
Step Into
button executes the next statement, and if it is a function call, it proceeds to
the first statement within the function. Refer again to
Figure 2.11.
Clicking
Step Into
at this
point advances the position indicator to the first statement within the
callMe()
function.
N
OTE
:
Be aware that it is not possible to step into native functions, since they have no
JavaScript implementation. This applies to Acrobat native functions as well as core
JavaScript functions.
Acrobat JavaScript Scripting Guide
51