Adobe 27510753 Scripting Guide - Page 59

Controlling code execution, Visual indication of execution states, Continue, Break, Step Over

Page 59 highlights

Adobe InDesign CS2 Scripting Guide Using ExtendScript Tools and Features 51 the variables and functions are already known to the JavaScript engine. During debugging, however, this is an extremely useful way to display the current value of a variable, along with its current data type. You can turn off the display of help tips using the Display JavaScript variables and Enable UI help tips checkboxes on the Help Options page of the Preferences dialog. Controlling code execution The debugging commands are available from the Debug menu, from the Editor's right-click context menu, through keyboard shortcuts, and from the toolbar buttons. Use these menu commands and buttons to control the execution of code when the JavaScript Debugger is active. Run Continue Break F5 (Windows) Ctrl+R (Mac OS) Ctrl+F5 (Windows) Cmd+. (Mac OS) Starts or resumes execution of a script. Disabled when script is executing. Halts the currently executing script temporarily and reactivates the JavaScript Debugger. Enabled when a script is executing. Stop Shift+F5 (Windows) Stops execution of the script and generates a runtime error. Ctrl+K (Mac OS) Enabled when a script is executing. Step Over F10 (Windows) Ctrl+S (Mac OS) Halts after executing a single JavaScript line in the script. If the statement calls a JavaScript function, executes the function in its entirety before stopping (do not step into the function). Step Into F11 (Windows) Ctrl+T (Mac OS) Halts after executing a single JavaScript line statement in the script or after executing a single statement in any JavaScript function that the script calls. Step Out Shift+F11 (Windows) When paused within the body of a JavaScript function, resumes Ctrl+U (Mac OS) script execution until the function returns. When paused outside the body of a function, resumes script execution until the script terminates. Visual indication of execution states While the engine is running, an icon script is active. in the upper right corner of the Toolkit window indicates that the When the execution of a script halts because the script reached a breakpoint, or when the script reaches the next line when stepping line by line, the Editor displays the current script with the current line highlighted in yellow.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184

Adobe InDesign CS2 Scripting Guide
Using ExtendScript Tools and Features
51
the variables and functions are already known to the JavaScript engine. During debugging, however, this is an
extremely useful way to display the current value of a variable, along with its current data type.
You can turn off the display of help tips using the Display JavaScript variables and Enable UI help tips
checkboxes on the Help Options page of the Preferences dialog.
Controlling code execution
The debugging commands are available from the Debug menu, from the Editor’s right-click context menu,
through keyboard shortcuts, and from the toolbar buttons. Use these menu commands and buttons to
control the execution of code when the JavaScript Debugger is active.
Run
Continue
F5 (Windows)
Ctrl+R (Mac OS)
Starts or resumes execution of a script.
Disabled when script is executing.
Break
Ctrl+F5 (Windows)
Cmd
+.
(Mac OS)
Halts the currently executing script temporarily and reactivates
the JavaScript Debugger.
Enabled when a script is executing.
Stop
Shift+F5 (Windows)
Ctrl+K (Mac OS)
Stops execution of the script and generates a runtime error.
Enabled when a script is executing.
Step Over
F10 (Windows)
Ctrl+S (Mac OS)
Halts after executing a single JavaScript line in the script. If the
statement calls a JavaScript function, executes the function in its
entirety before stopping (do not step into the function).
Step Into
F11 (Windows)
Ctrl+T (Mac OS)
Halts after executing a single JavaScript line statement in the
script or after executing a single statement in any JavaScript func-
tion that the script calls.
Step Out
Shift+F11 (Windows)
Ctrl+U
(Mac OS)
When paused within the body of a JavaScript function, resumes
script execution until the function returns.
When paused outside the body of a function, resumes script
execution until the script terminates.
Visual indication of execution states
While the engine is running, an icon
in the upper right corner of the Toolkit window indicates that the
script is active.
When the execution of a script halts because the script reached a breakpoint, or when the script reaches the
next line when stepping line by line, the Editor displays the current script with the current line highlighted in
yellow.