User`s guide
l Editor mode
As its name indicates, this mode enables full editing access to the program in the editor
window. All the features of the SEE editor can be used in this mode.
NOTE:Programs that have been loaded from disk files with the read-only attribute
cannot be accessed in editor read-write mode.
Use the Edit (F11)and Debug (S+F11) keys (or Ctrl+E) to change modes.
Debugging Programs
The basic strategy for debugging a program is:
1. Invoke the program debugger with the DEBUG monitor command, the DEBUG editor
extended command, or the Debug (S+F12) key.
2. Initiate execution of the program (usually with the PRIME or XSTEP monitor
commands). (This step can be performed before or after the debugger is initiated.)
3. Step through the program (executing individual steps, sections of the program, or
complete subroutines) to trace the flow of program execution. (A later section of this
chapter describes control of program execution while debugging.)
4. Use the Display (F5)and Teach (S+F5) keys to display and redefine the values of
variables.
5. Use edit mode to perform any desired editing operations on the program.
6. Repeat steps 2 through 5 as required.
7. Exit from the debugger.
The following sections describe the debugger commands and other features of the V+ system
that aid program debugging.
When using the debugger, keep in mind:
l Some system monitor commands are not accepted in debug monitor mode. (For
example, the COMMANDS command is not accepted.)
l In some situations the terminal cursor is in the edit window when you want it to be in
the debug window. In debug monitor mode, the Redraw (S+F6) or Undo (F6) keys
forces the cursor to the bottom line of the debug window.
l Output to the screen from the program is generally directed to the debug window.
However, if the output includes control strings to position the cursor (for example,
clear the screen), the program output may appear in the edit window. The Redraw
(S+F6) key restores the normal debugger display (except in the situation described by
the next item).
l When the program displays a prompt for input in the debug window and executes a
The Program Debugger
V+Language User's Guide, v17.0
Page 90










