2
Acrobat JavaScript Tools
Acrobat JavaScript Debugger
Acrobat JavaScript Debugger
You can open the Acrobat JavaScript Debugger at any time by selecting the Acrobat menu
item
Advanced > JavaScript > Debugger.
Familiarize yourself with the parts of the
window and the controls as described here before you attempt interactive debugging of a
script.
The section
Accessing Scripts in the Scripts Window
scripts that may be debugged. The section
Starting the Debugger
automatically start the debugger for a script.
IMPORTA NT:
On Windows, while the Debugger is open and a debugging session is in
progress, Acrobat will be unavailable.
Main Groups of Controls
The debugger dialog, shown below in
Figure 2.9,
consists of three main groups of controls.
The toolbar on the top left contains six button controls that provide basic debugging
session functionality. See
Figure 2.10
below for details.
Immediately below the toolbar, a
Scripts
window displays the names of scripts available for
debugging. These are organized in a tree hierarchy, such as the one shown below in
Figure 2.9,
and may be accompanied by the
Script
window below, which shows the code
for a single script corresponding to the one highlighted in the
Scripts
window.
The
Call Stack
and
Inspect
drop-down lists are located at the top right of the debugger
dialog. Selecting entries in these lists enables you to view the nesting order of function
calls, and enable you to inspect the details of variables, watches, and breakpoints in the
Inspect
details window.
Debugger View Windows
Below the main group of controls, the debugger provides a
Views
drop-down list with the
following choices:
●
●
Script:
view a single JavaScript script selected from the Scripts hierarchy window.
Console:
view the output of a selected script as it executes in the JavaScript console
window. The console may also be used to run scripts or individual commands. See
Using
Script and Console:
view both the console and script windows at the same time. The
script window displays above the console window, as shown in
Figure 2.9.
●
48
Acrobat JavaScript Scripting Guide