Adobe 12001196 - Acrobat - Mac Manual page 45

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

Advertisement

Acrobat JavaScript Debugger
3
Inspect Details Window
display an alert telling you that you cannot set a breakpoint on that location. You can only
set a breakpoint next to the codeline containing the left curly brace.
In
Figure
3.9, you can set the breakpoint on the line with the left curly brace following the
function name callMe(). You can set a breakpoint on the line containing the curly brace
and the testLoop() function name. In either case, the effect is the same. Executing from
the breakpoint evaluates that function.
F
3.9
Setting a Breakpoint Before a Function Definition
IGURE
Setting a breakpoint just before the call to a function and then running the script
containing it causes execution to stop at the first statement within the function.
Listing Breakpoints
Selecting the Breakpoints option from the Inspect drop-down list allows you to see a list of
all the breakpoints that you set during a debugging session. You can edit and delete
breakpoints using the button controls just beneath the Inspect details window, as shown
in
Figure
3.7. Select the breakpoint you want to edit or delete in the Inspect details
window to activate the button controls for breakpoints.
Using Conditional Breakpoints
Conditional breakpoints are sometimes necessary when debugging. If you are debugging
an iteration loop, for example, and your problem only occurs after the loop control variable
reaches a certain value, it may take too long for you to step through every iteration. A
conditional breakpoint can help you determine when to stop.
A conditional breakpoint causes the interpreter to stop the program and activate the
debugger if a certain condition is met. You specify the condition as a JavaScript expression.
If the result of the expression evaluates to true, the interpreter stops the program at the
breakpoint. Otherwise, the interpreter does not stop the program. An unconditional
breakpoint always causes the interpreter to stop the program and to activate the debugger
when it reaches the line of code where the breakpoint is set.
By default, all breakpoints created in Acrobat have their conditions set to true. To change a
breakpoint condition, select Breakpoint from the Inspect drop-down list and click Edit. This
displays a popup window in which you can change the breakpoint condition.
45
Acrobat JavaScript Scripting Guide

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Acrobat 6.0

Table of Contents