Watches; Breakpoints - Adobe 12001196 - Acrobat - Mac Manual

Javascript
Hide thumbs Also See for 12001196 - Acrobat - Mac:
Table of Contents

Advertisement

Acrobat JavaScript Debugger
3
Inspect Details Window

Watches

The Watches list enables you to customize your inspection of variables. Watches are
JavaScript expressions evaluated every time the debugger stops at a breakpoint or a step in
execution. You can add as many watches as you need in the Watches list. You can edit, add,
or delete watches using the three buttons just below the Inspect details window. Results
are evaluated and displayed in the Inspect details window in the order they are entered in
the Watches list that you create.
To start working with watches, select Watches from the Inspect drop-down list. Clicking
New below the details window displays a popup window in which you can enter the
JavaScript variable or expression that you want to be evaluated.
To change the value of a watch, select the watch from the list. Clicking Edit displays a
popup, allowing you to specify a new expression for evaluation. To delete a watch, select it
from the Inspect drop-down list and click Delete. This removes the watch from the details
window.

Breakpoints

The Breakpoints option in the Inspect drop-down list allows you to manipulate program
breakpoints. A breakpoint is the exact location where you want your script execution to
halt so you can check the values of local variables at that point. Breakpoints are defined for
a particular line of code, and they can be either unconditional or conditional. (See
Conditional Breakpoints" on page
When a breakpoint is reached, JavaScript execution stops and the debugger shows that
line of code.
To add a breakpoint, click on the gray strip to the left of the script in the script view. The
lines on which breakpoints are allowed are indicated by a small horizontal line. When a
breakpoint has been set, a red dot indicates the position. Clicking the red dot removes the
breakpoint.
Coding Styles and Breakpoints
Placement of the left curly brace ({) in a function definition is a matter of style.
Style 1: Place the left curly brace on the same line as the function name, for example,
function callMe() { // curly brace on same line as function name
}
Style 2: Place the left curly brace on a separate line, for example
function callMe()
{ // curly brace is on a separate line
}
The Acrobat JavaScript debugger will not let you set a breakpoint next to the function
name for Style 2. Attempting to set a breakpoint in this location causes the debugger to
44
var a = 0;
var a = 0;
45.)
"Using
Acrobat JavaScript Scripting Guide

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Acrobat 6.0

Table of Contents