![]() |
![]() |
27 |
![]() |
Chapter 4: Debugging
|
Using Debug Points
In the Program menu there are seven options which control the debugging of the program:
Full speed (or Debug disabled)
Show Trace- TROFF
Show Trace- TRON
Single Step
<<TROFF>> disabled
The first option is Full speed only if there are no debug points in the current workspace component, it changes to Debug disabled as soon as you add any. If either of these options is selected, all debug points are totally ignored, (Of course, if Full speod is selected, there are no debug points
to
ignore.) The difference between Full speed and Debug disabled in that when there are debug points in theprogram, BASIC 2 Plus has to invest a small amount of time looking for them in order to ignore them. Debug disabled thus runs slightly slower than Full npeed.
Debug enabled means that the program obeys STOP and Action commands in debug points, but ignores any commands concerning the tracing.
The remaining options are described in the next section, where tracing is explained fully.
Tracing
Often when debugging it is useful to be able so follow the flow of control around a program, watching to see which branch of an IF statement is
taken,
for example, or following a chain
of subprograms or modules.
Program tracing provides the way
to
do this. When tracing is switched on, the program runs very slowly so that the statement being processed can be displayed in the Edit window. The cursor is always shown on this line, so by following the position of the cursor you can watch the flow of control directly.
If
something happens which you want
to
investigate, you can quickly move the cursor
to
the menu bar, select Stop, and then enter some direct debug commands.
|
BASIC 2 Plus: User Guide & Quick Reference
27
|
![]() |
![]() |
27 |
![]() |