In debug mode, execution of your script will pause if the path of execution encounters an enabled breakpoint. When a script pauses at a breakpoint, it pauses before executing the breakpointed line.
Places where you can set a breakpoint are shown as “executable” arrows in the gutter of the script window.
To set a breakpoint:
Click an “executable” arrow (or the gutter next to it).
Or, select within the desired line; then choose Script > Set Breakpoint.
Or, Control-click in the desired line, and choose Set Breakpoint from the contextual menu.
A breakpoint marker appears in the gutter.
To remove a breakpoint:
Select within the breakpointed line; then choose Script > Remove Breakpoint.
Or, Control-click in the breakpointed line, and choose Remove Breakpoint from the contextual menu.
Or, Control-click the breakpoint’s listing in the breakpoints inspector and choose Remove from the contextual menu.
To remove all breakpoints:
Choose Script > Remove All Breakpoints.
Or, choose Remove All Breakpoints from the script’s contextual menu.
You can create a breakpoint only in debug mode, but the breakpoint is not lost if you leave debug mode — it will still be there the next time you switch to debug mode. Breakpoints are saved when you save a compiled script in debug mode. They are lost when you save a compiled script in normal mode and close the script.
A breakpoint can be enabled or disabled. A disabled breakpoint doesn’t act like a breakpoint, but it’s not removed, either, so you can enable it later if you like. A disabled breakpoint’s marker is transparent; an enabled breakpoint’s marker is solid.
To disable a breakpoint:
Click the breakpoint marker.
Or, select within the breakpointed line; then choose Script > Disable Breakpoint.
Or, Control-click in the breakpointed line, and choose Disable Breakpoint from the contextual menu.
Or, uncheck the breakpoint’s listing in the breakpoints inspector.
To enable a breakpoint:
Click the breakpoint marker.
Or, select within the breakpointed line; then choose Script > Enable Breakpoint.
Or, Control-click in the breakpointed line, and choose Enable Breakpoint from the contextual menu.
Or, check the breakpoint’s listing in the breakpoints inspector.
You can also disable the entire breakpoint mechanism. If the breakpoint mechanism is disabled, breakpoint markers are shown in grey. If the breakpoint mechanism is enabled, breakpoint markers are shown in color. To disable the breakpoint mechanism:
Choose Script > Break on Breakpoints so that it is unchecked.
Or, click Breakpoints in the toolbar so that the “x in a red circle” badge appears.
To enable the breakpoint mechanism:
Choose Script > Break on Breakpoints so that it is checked.
Or, click Breakpoints in the toolbar so that the “✓ in a green circle” badge appears.
Or, enable any disabled breakpoint. The breakpoint mechanism is automatically enabled as a whole when you enable an individual breakpoint.
|