Debugging in the Debugger window
97
To add an object to the Watcher pane whose name does not appear in the Script pane:
1
Double-click the first empty cell in the object column of the Watcher pane.
2
Type the name of the object in the cell and press Enter (Windows) or Return (Macintosh).
If the object has properties, a plus sign (+) appears next to the object’s name.
To display an object’s properties:
•
Click the plus sign next to the object name.
The Watcher pane lets you organize objects in a few ways.
To organize objects in the Watcher pane, do one of the following:
•
To sort the objects in the Watcher pane, click the Name column head at the top of the left
column. The object names in the column are listed in alphabetical order.
•
To sort the objects in reverse-alphabetical order, click the Name column head a second time.
•
To organize objects into groups, use the tabs in the Watcher pane. To add an object to a
specific tab, click the tab you want to use before adding the object.
•
To clear the contents of a tab in the Watcher pane, select the tab and then right-click
(Windows) or Control-click (Macintosh) in the Watcher pane and select Clear All.
Stepping through scripts in the Debugger window
The Debugger window provides you with a set of tools for running scripts slowly, so you can
watch the effect that each line of code has on your movie. You can execute one line of code at a
time and choose whether to execute nested handlers one line at a time or all at once.
To execute only the current line of code indicated by the green arrow:
•
Click the Step Script button.
Many handlers include calling statements to other handlers. You can focus your attention on such
nested handlers, or ignore them and focus on the code in the current handler.
When you are confident that nested handlers are performing as expected and want to concentrate
on the code in the current handler, the Debugger window can step over nested handlers and go
directly to the next line of code in the current handler. When the Debugger steps over a
nested handler, it executes the handler, but does not display the handler’s code or pause within
the nested handler.
To step over nested handlers:
•
Click the Step Script button in the Debugger window.
The Step Script button runs the current line of code, runs any nested handlers that the line
calls, and then stops at the next line in the handler.
If you suspect that nested handlers are not performing as expected and want to study their
behavior, the Debugger window can run nested handlers line by line as well.
To run nested handlers one line at a time:
•
Click the Step Into Script button in the Debugger window.
Clicking the Step Into button runs the current line of code and follows the normal flow
through any nested handlers called by that line. When finished with a nested handler, the
Debugger window stops at the next line of code within the upper-level handler.
Summary of Contents for DIRECTOR MX 2004
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...