A SERVICE OF

logo

Adobe Version Cue CS3 Client Programmer’s Guide
Scripting Environment
26
For help in developing, debugging, and testing scripts, ExtendScript provides the following:
z The ExtendScript Toolkit itself, which has a full-featured source-level debugger and devel-
opment environment for writing JavaScript code.
z A global debugging object, the dollar ($) object, which can emit trace to the JavaScript con-
sole in the ExtendScript Toolkit. See “Debugging, Logging, and Profiling with the Toolkit”
on page 26.
z A reporting utility for ExtendScript elements, the ExtendScript Reflection Interface. For
instance, this enables you to dump properties for any class.
To identify specific Creative Suite applications, scripts must use the correct application and
namespace specifiers, described in “Application and Version Specifiers” on page 27. These can
target not only an application at a specific version level, but also a particular localized version.
ExtendScript has a localization utility for providing user interface string values in different lan-
guages. ExtendScript supports preprocessor directives, to allow scripts to be combined using
#include and other directives; see “Preprocessor Directives in ExtendScript” on page 27. The
BridgeTalk component allows inter-application communication through scripting; for
instance, one Creative Suite application can send JavaScript code to another through this
BridgeTalk mechanism. This is described in the Bridge JavaScript documentation.
To find out more about ExtendScript, see the JavaScript Tools Guide in the Adobe Bridge CS3
SDK.
Debugging, Logging, and Profiling with the Toolkit
The ExtendScript Toolkit has a comprehensive set of features typical of an interactive source-
level debugger, including the following:
z Setting normal and conditional breakpoints within a script.
z A JavaScript console window, which shows trace output; for instance, emitted using the
Dollar object.
z Inspecting the state of variables in a script halted within the script debugger.
z Single-stepping through lines of script code: stepping into, over, and out of functions.
z Displaying the call stack and letting you switch scope to different functions in the stack.
NOTE: You can’t just set a breakpoint through the IDE of ExtendScript Toolkit to break at
specific lines of code in your scripts when they are sent from the server. To debug
server-driven scripts for Version Cue, add “$.bp() ;” to set a breakpoint in your script
sent from the Version Cue Server to the Version Cue client. You also add
“VersionCue.debugLevel = 1;” to enable the debugger. When the script executes, this
will halt ExtendScript Toolkit at the line you added. See the JavaScript Tools Guide in
the Adobe Bridge CS3 SDK for more information on using the dollar object methods
and properties.
NOTE: The Version Cue client downloads the script when the project is first entered;
thereafter, the client needs to be restarted. This means if you change the script, you
must restart the client to have it execute the new script correctly.