2
Acrobat JavaScript Tools
Summary
There are limitations to debugging scripts in Acrobat from inside a browser, because not all
scripts contained in a PDF file may be available if the PDF file has not been completely
downloaded.
Debugging is not possible if a modal dialog is running. This may occur when debugging a
batch sequence. If a modal dialog is running during a debugging session and the program
stops responding, press the
Esc
key.
Debugging scripts with an event initiated by either the
app.setInterval()
or
app.setTimeOut()
method may trigger the appearance of a series of recurring alert
messages. If this occurs, press the
Esc
key after the modal dialog has exited.
Summary
The Acrobat JavaScript Debugger is a fully capable tool for troubleshooting problems in
Acrobat JavaScript scripts. In combination with the
Edit > Preferences
dialog box, the
debugger enables you to make decisions about how to control the behavior of your
Acrobat JavaScript development environment, which consists of three main sets of controls
for selecting and executing scripts. The six buttons provide basic control over execution,
the
Scripts
window enables you select a script for debugging, the
Call Stack
and
Inspect
lists, in combination with an
Inspect
details window, provide a view of nested function calls
(stack frames) as well as details related to objects, variables, watches, and breakpoints. You
may utilize the
Inspect
details window controls to set and clear breakpoints, inspect
variable values while stepping through JavaScript code, and manage custom watches for
examination during script execution.
62
Acrobat JavaScript Scripting Guide