25

Chapter 4: Debugging
Debug Points
Debug points are special markers thalyon can pulinto ysurprogram to make BASIC 2 Plus carry out certain actions. They perform the job which in other BASICs is done by trace statements special statements pus into she program which are only used so track down errors. Debug points are better than trace statements for foarreasons:
Debug statements can be inserted and removed without restartingaprogram. All a program’s debug points can be activated, deactivated, or removed with one command.
The commands executed by debug statements do not needto be changed individually. Debug statements can turn tracing on and off. (The section on Tracing explains thisfully.)

There are two stages so using debug points; defining and inserting them, and running the program with Debug enabled.

Inserting and deleting Debug Points
To insert a debug point, put the cursor where you want to insert it, and select Set Debug Puint... from the Debug menu. A dialogue will appear giving you two choices of three optiom each.


One choice concerns tracing; iswitlbe explained in the next section.

The other choice concerns what you want to happen when the program reaches the debug
point, You can choose between:
STOP
Action: 1
No action
BASIC 2 Plus: User Guide & Quick Reference 25

25