The Javascript Console; The Call Stack - Adobe 27510753 - InDesign CS2 - PC Manual

Scripting guide
Hide thumbs Also See for 27510753 - InDesign CS2 - PC:
Table of Contents

Advertisement

48
Using ExtendScript Tools and Features

The JavaScript console

The JavaScript console is a command shell and output window for the currently selected JavaScript engine. It
connects you to the global namespace of that engine.
The command line entry field accepts any JavaScript code, and you can use it to evaluate expressions or
call functions. Enter any JavaScript statement on the command line and execute it by pressing Enter. The
statement executes within the stack scope of the line highlighted in the Call Stack tab, and the result appears
in the output field.
The command line input field keeps a command history of 32 lines. Use the Up and Down Arrow keys to
l
scroll through the previous entries.
Commands entered in this field execute with a timeout of one second. If a command takes longer than
l
one second to execute, the Toolkit generates a timeout error and terminates the attempt.
The output field is standard output for JavaScript execution. If any script generates a syntax error, the error is
displayed here along with the file name and the line number. The Toolkit displays errors here during its own
startup phase. The tab's flyout menu allows you to clear the contents of the output field and change the size
of the font used for output.

The call stack

The Call Stack tab is active while debugging a program. When an executing program stops because of a
breakpoint or runtime error, the tab displays the sequence of function calls that led to the current execution
point. The Call Stack tab shows the names of the active functions, along with the actual arguments passed in
to that function.
For example, this stack pane shows a break occurring at a breakpoint in a function dayOfWeek :
The function containing the breakpoint is highlighted in both the Call Stack and the Editor tabs.
You can click any function in the call hierarchy to inspect it. In the Editor, the line containing the function call
that led to that point of execution is marked with a green background. In the example, when you select the
line [Top Level] in the call stack, the Editor highlights the line where the dayOfWeek function was called.
JavaScript command line
JavaScript output
Adobe InDesign CS2 Scripting Guide

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Indesign cs2

Table of Contents