OpenBoot 3.x Command Reference Manual

The Forth Source-Level Debugger

The Forth source-level Debugger allows single-stepping and tracing of Forth programs. Each step represents the execution of one Forth word.

The debugger commands are shown in Table 6-5.

Table 6-5 Forth Source-level Debugger Commands




"Continue". Switch from stepping to tracing, thus tracing the remainder of the execution of the word being debugged. 


"Down a level". Mark for debugging the word whose name was just displayed, then execute it. 


"Up a level". Un-mark the word being debugged, mark its caller for debugging, and finish executing the word that was previously being debugged. 


Start a subordinate Forth interpreter with which Forth commands can be executed normally. When that interpreter is terminated (with resume), control returns to the debugger at the place where the f command was executed.


"Go." Turn off the debugger and continue execution. 


"Quit". Abort the execution of the word being debugged and all its callers and return to the command interpreter. 


"see". Decompile the word being debugged. 


Display the address,len on top of the stack as a text string. 


"Help". Display symbolic debugger documentation. 


"Short Help". Display brief symbolic debugger documentation.  

debug name

Mark the specified Forth word for debugging. Enter the Forth Source-level Debugger on all subsequent attempts to execute name. After executing debug, the execution speed of the system may decrease until debugging is turned off with debug-off. (Do not debug basic Forth words such as ".".)


Like debug except that (debug takes an execution token from the stack instead of a name from the input stream.


Turn off the Forth Source-level Debugger so that no word is being debugged. 


Exit from a subordinate interpreter, and go back to the stepper (See the f command in this table).


Set "step mode" for the Forth Source-level Debugger, allowing the interactive, step-by-step execution of the word being debugged. Step mode is the default. 


Set "trace mode" for the Forth Source-level Debugger. Tracing enables the execution of the word being debugged, while showing the name and stack contents for each word called by that word. 


Execute the word just displayed and proceed to the next word. 

Every Forth word is defined as a series of one or more words that could be called "component" words. While debugging a specified word, the debugger displays information about the contents of the stack while executing each of the word's "component" words. Immediately before executing each component word, the debugger displays the contents of the stack and the name of the component word that is about to be executed.

In trace mode, that component word is then executed, and the process continues with the next component word.

In step mode (the default), the user controls the debugger's execution behavior. Before the execution of each component word, the user is prompted for one of the keystrokes specified in Table 6-5.