There are three ways to enter the Debugger:
Pressing BREAK during program execution invokes the mvBASIC Debugger. (This feature can be turned off within a program with the BREAK statement.)
The D option to the RUN command will cause the program to enter the Debugger before starting execution.
If the DEBUG statement is encountered in execution, the program will enter the Debugger at that point.
Fatal errors will also invoke the Debugger, with or without the user’s consent (Nonfatal errors will invoke the Debugger only if the RUN command is used with the E option.) When control passes to the Debugger for any of the above reasons, the current line number (preceded by I for Interrupt, E for Execution step, or M for Modal) is printed, and the * prompt displays.
Once in the Debugger, the user can print and change variable values, set breakpoint conditions or execution steps, and continue execution with the G command. When a breakpoint condition or execution step is reached, the Debugger will be instantly re-entered.
The Symbol Table
Variables within a program are each assigned a symbol, to be referenced by the interactive Debugger. When a program or subroutine is compiled, a symbol table is generated with the object code. The Debugger accesses the symbol table through a pointer in the file dictionary. If the program calls an external subroutine, a complete symbol table can be accessed by the Debugger for the external subroutine.
The S option to COMPILE suppresses the symbol table from being generated, but it should be used only when a program is fully operational. Without the symbol table, the Debugger’s function is greatly impeded.
See Also
Debugger Commands: Quick Reference