Using Breakpoints

AutoCAD AutoLISP & Visual LISP

 
Using Breakpoints
 
 
 

Breakpoints allow you to mark a position in a program at which program execution should be interrupted. You can set breaks to occur before or after parenthetical expressions. Breakpoints can only be set from a VLISP text editor window.

To set a breakpoint

  1. Move the cursor to the position at which you want to halt execution. For example, to halt execution just before the open parenthesis of an expression, place the cursor just to the left of that open parenthesis.
  2. Choose the Toggle Breakpoint toolbar button or press F9 to set the breakpoint. (For variety, you can set a breakpoint by choosing Debug Toggle Breakpoint from the VLISP menu, or by right-clicking the mouse and selecting Toggle Breakpoint from the resulting shortcut menu.)

    If you move the cursor to an ambiguous position, such as in the middle of an expression, VLISP will move the cursor to the nearest parenthesis and display the following message asking whether you agree with the breakpoint placement:

  3. Click Yes to accept the breakpoint location, or No if that is not where you want to set the break.To remove a breakpoint
  1. Position your cursor at the breakpoint you want to remove.
  2. Choose the Toggle Breakpoint toolbar button, or press F9.

    The Toggle Breakpoint works as an on/off switch. When no breakpoint exists, Toggle Breakpoint adds a break; if a breakpoint already exists at the cursor position, Toggle Breakpoint removes it. You can also use the Breakpoint Service dialog to remove breakpoints; see Listing and Viewing the Breakpoints in Your Program for information on this procedure.

  3. To remove all the breakpoints you have set, choose Debug Clear All Breakpoints from the VLISP menu.