Full BASIC has debugging facilities BREAK and TRACE.
When you use these facilities, you must execute DEBUG ON beforehand.
activates the debug facilities.
inactivates the debug facilities.
The default is OFF.
The scope of a DEBUG statement is the program unit, and the setting remains hereafter statically.
( In this sense, DEBUG has abnormality among the statements of Full BASIC.)
If BREAK is executed when debug facilities are activated, BREAK interrupts the execution of the program and displays the debug window, provided that when DEBUG is written on a when-body, DEBUG raises an exception of extype 10007.
If debug facilities are not activated, BREAK does nothing.
If TRACE ON is executed when debug facilities are activated, trace facility is activated on the program unit where is executed.
Trace results are output to the same window as PRINT statements use.
Trace reports are the statements executed, the variables varied and the new value of them.
TRACE ON TO #Channel_Number
Trace reports are output to the channel.
Trace facility shall be inactivated on the program unit.
The scope of a TRACE statement is the program unit. Any program unit is set trace off on the invocation.
Usage of the debug window is convenient rather than the debug using program codes.
To display the debug window, select RUN-STEP.
Refer to debug Window
An original statement PAUSE enables the program to transfer to the Debug state.