Setting a Breakpoint to Interrupt Program Execution
 
 
 

Begin by entering some debugging information in the text editor window containing the yinyang.lsp program.

To set a breakpoint that interrupts program execution

  1. Move the cursor in front of the open parenthesis in the line of code that reads:
    (setq half-r (/ radius 2))
    

    The following screen snapshot indicates the position of this statement within the program:

  2. Click the Toggle Breakpoint button in the Debug toolbar, or choose Debug Toggle Breakpoint from the VLISP menu. Toggle Breakpoint switches breakpoints on and off. When no breakpoint exists, Toggle Breakpoint adds a break; if a breakpoint already exists at the cursor position, Toggle Breakpoint removes it.

  3. Load the yinyang function, if you have not done so already, run it from the VLISP Console prompt by entering the following command:
    (yinyang)
    

    After you reply to the prompts the program displays at the AutoCAD command line, VLISP halts yinyang execution at the breakpoint you set and displays the code in the text editor window:

    Note how the statement following the cursor is highlighted.