Entering the Debugger

There are three ways to enter the Debugger:

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

Using the mvBASIC Debugger

Debugger Commands: Quick Reference

Fixing a Bug

A Sample Program

Exiting the Debugger

Displaying and Changing a Variable

Accessing Source Code

Using Breakpoints and Tracing

Using Execution Control

Printing Output

Using the Return Stack