LNS Home
Script Debugger
Download & Buy
x Explore
x Edit
x Run & Debug
x Deploy
What's New In 4.5
bullet Documentation
bullet Blog Posts
My SD Story
Software Updates
 
4.0.9 Update
3.0.9 Update
bullet 2.0.5 Update
x Free Downloads
 
XML Tools
XSLT Tools
x Property List Tools
x List & Record Tools
Register Your Copy of Script Debugger
Join the Script Debugger Mailing List
x AppleScript/ Scripting Links
Products
x Script Debugger 4.5
Site Contents
bullet Mark’s Blog
Product Registration
Bug Reporting
x Freeware
Contacting Us

SD4 Headling


image

Breakpoints

image

A breakpoint designates an executable line of code where your script will pause if the path of execution reaches it. When a script pauses at a breakpoint, it pauses before executing the breakpointed line.

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.

Places where you can set a breakpoint are shown with diamonds in the gutter of the script window.

To set a breakpoint:

  • Select within the desired line, then choose Script > Set Breakpoint. Alternatively, click in an empty diamond. The diamond is filled with red, showing that a breakpoint has been set.

To clear (remove) a breakpoint:

  • Select within the desired line, then choose Script > Clear Breakpoint. Alternatively, click in a red diamond. The diamond becomes empty, showing that there is no breakpoint there. You can clear all breakpoints at once by choosing Script > Clear All Breakpoints.

You can also leave all breakpoints in place but turn them off temporarily by choosing Script > Break on Breakpoints. If the menu item is unchecked, breakpoints are disabled. Encountering a breakpoint in the path of execution will not cause your script to pause. (If breakpoints appear to have mysteriously stopped working, check to make sure that Break on Breakpoints has not gotten unchecked!) Also, there is an optional toolbar icon you can add to the script window toolbar; the icon toggles its state to show whether we’re going to break on breakpoints or not.

imageimage

It is also possible to make a temporary breakpoint. A temporary breakpoint is a breakpoint which, when it is encountered, clears itself. Thus, we will pause there, but only once (because after that, the breakpoint will be gone). This is convenient, for example, to pause the first time through a loop but not on subsequent iterations. To set a temporary breakpoint, choose Script > Set Temporary Breakpoint. Alternatively, Option-click in an empty diamond. The diamond gets a little + sign in it.

image

In the above illustration:

  • The repeat line has an empty diamond. A breakpoint could go there, but there isn’t one now. (The blue shading in the gutter indicates that execution has passed through that line.)

  • The set line has a breakpoint (the diamond is red), and we are paused there (the blue arrow is there), before executing the line.

  • The return line has a temporary breakpoint (there is a + sign in its diamond). When we proceed and reach it, we will pause there and the breakpoint will be cleared.

The execute to here facility is a convenient way to combine setting a breakpoint with resuming execution.

Further Details:
  Execute to Here


Explore | Edit | Run & Debug | Deploy | What's New In 4.5 | My SD Story


Copyright © 1998-2009 Late Night Software Ltd. - All Rights Reserved.