The breakpoints inspector lists the breakpoints in your scripts and lets you attach conditions and actions to a breakpoint.
The breakpoints inspector appears in a script window in debug mode in the same tab as the result pane and the variables pane. To see the breakpoints inspector:
Choose View > Result & Variables Tab.
Or, click Result & Variables in the toolbar.
The breakpoints inspector functions as a list of breakpoints. You can:
See the location of each breakpoint. The line number is given in the Line # column, and you can select the line:
Double-click the breakpoint listing.
Or, Control-click a breakpoint listing and choose Go To Source Line from the contextual menu.
See how many times a breakpoint has been encountered during this execution of this script. The number is given in the Hits column.
Enable or disable a breakpoint:
Change the name of a breakpoint:
The default name of a breakpoint is the text of the breakpointed line.
Delete a breakpoint:
Sort the list:
To see and edit conditions and actions attached to a breakpoint:
Select the breakpoint listing and press Right Arrow.
Or, click the triangle in the breakpoint listing.
There are two kinds of condition. If one condition is checked, we will pause at this breakpoint only if the checked condition is true. If both conditions are checked, we will pause at this breakpoint only if both conditions are true.
Hit count. We pause with respect to how many times this breakpoint has been encountered during this execution. You can set a number of times and a comparison operator.
Recall that the actual hit count is visible in last column of the inspector.
Expression. Enter an AppleScript expression in the text field. The expression is evaluated when the breakpoint is encountered. We will pause or not, based on:
The expression’s truth value. The expression must evaluate to a boolean; it is not implicitly coerced to a boolean.
Or, the expression’s exception value. You can pause because the expression does or does not generate an exception (a runtime error).
There are three kinds of action. Actions are performed only if we would pause at this breakpoint (because the breakpoint is encountered and conditions, if any, are true).
Post a message to the event log and/or the status bar.
The status bar message appears in brackets after the normal status bar content. A subsequent status bar message can, of course, replace this one.
Clear the hit count.
If this breakpoint is encountered again during this execution, the hit count will be recorded as 1.
Specify an execution command. What should happen when we’ve hit this breakpoint? The default command (the thing that usually happens at a breakpoint) is Pause, but you can choose any other execution command, including Stop, Resume (i.e. proceed without pausing), or any of the step commands.