Stepping Out of the gp:getPointInput Function and into C:Gpmain

AutoCAD Visual LISP

 
Stepping Out of the gp:getPointInput Function and into C:Gpmain
 
 
 

There is one more point to illustrate: what happens to the value of the local variables in gp:getPointInput after you exit the function.

To exit gp:getPointInput and return control to c:gpath

  1. Choose the Step Out button.

    VLISP steps to the very end of the gp:getPointInput function and stops just before exiting.

  2. Choose the Step Into button.

Control returns to c:gpmain, the function that called gp:getPointInput.

Examine the values of the variables in the Watch window. Because they are variables local to the gp:getPointInput function, endpt and StartPt are nil. VLISP automatically reclaimed the memory occupied by these variables. Normally, the third local function variable HalfWidth also contains a value of nil, but due to debugging activity, it was overridden globally in the Console window and still possesses the value 2.0 in the Watch window. Also the global *Last-Value* variable displays the association list constructed by gp:getPointInput.

Your first debugging session is complete. But don't forget your program is still in suspended animation.

To complete this lesson

  1. Choose the Continue button on the Debug toolbar. Respond to the prompts. This runs the program to completion.

  2. Choose Debug Clear All Breakpoints from the VLISP menu. Respond “yes” to the prompt. This removes all the breakpoints within your code.

    Remember: you can remove individual breakpoints by positioning the cursor at the breakpoint and choosing the Toggle Breakpoint button.