While you step through your program, you can add variables to the Watch window and change their values.
If you do not see the Watch window, simply choose the Watch Window button on the toolbar to bring it back.
If your Watch window stills contains the variable gp_PathData, click the Clear Window button displayed at the top of the Watch window.
If you are debugging a program that is not working correctly, use breakpoints in combination with watches to make sure your variables contain the values you expect.
If a variable does not contain the value you think it should, you can change the value and see how it affects the program. For example, say that you expect the halfwidth value to be a whole number. But because you were not careful about picking the points during the input selections, you ended up with a value like 1.94818.
(setq halfwidth 2.0)
Note that the value in the Watch window changes. But can you be sure the new value will be used when the width sublist (40 . width) is created in the association list? Add one more expression to the Watch window to test this.
This adds a variable named *Last-Value* to your Watch window. *Last-Value* is a global variable in which Visual LISP automatically stores the value of the last expression evaluated.
(cons 40 (* HalfWidth 2.0))
If you overrode the value of HalfWidth as specified, the evaluation of this expression should return (40 . 4.0) in the Watch window.