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
- Click the Step Out button.
Visual LISP steps to the very end of the gp:getPointInput function and stops just before exiting.
- Click 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. Visual LISP 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 do not forget your program is still in suspended animation.
To complete this lesson
- Click the Continue button on the Debug toolbar. Respond to the prompts. This runs the program to completion.
- Click Debug
Clear All Breakpoints from the Visual LISP 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.