Use a slash followed by a string to search the source code for the next occurrence of the substring string. The syntax is as follows:
/
[
string]
The search begins at the line following the current line. If string is found, RAID sets the current line to the line containing string and displays that line. If you issue the / command without specifying string, RAID searches for the last-searched string.
This is an empty string if you have not yet specified a string during this RAID session. If RAID encounters the end of file without finding string, it starts at the first line and continues the search until it finds string or returns to the current line.
B: Setting Breakpoints
Use the B command to set or list RAID breakpoints. There are two syntaxes:
[
address|
line|
procedure[
: line] ]
:B B*You can set a RAID breakpoint at the current line, an object code address, a BASIC source line number, the beginning of a specified procedure, or a BASIC source line number within a specified procedure. RAID recognizes lines in called subroutines.
RAID executes the program up to the breakpoint and then stops and issues the ::
prompt. At that point you can issue another RAID command.
The following example sets breakpoints at line 30 and line 60 of the source code, then runs the program. The program stops executing and displays the RAID prompt when it reaches line 30, and again when it reaches line 60.
::30B ::60B ::R
The B* command lists all currently active breakpoints.
C: Continuing Program Execution
Use the C command to continue program execution until RAID encounters a breakpoint, or until completion. The C command turns off verbose mode (use the
V command to enter verbose mode). If the TRAP command line option is used, RAID is entered at every nonfatal error.
D: Deleting Breakpoints
Use the D command to delete RAID breakpoints. There are two syntaxes:
[
address|
line]
DD*
You can delete a RAID breakpoint at the current line, an object code address, or a BASIC source line number. If you use the * option, this command deletes all break-points. Some BASIC statements produce multiple run machine statements. If you delete a breakpoint by line number, RAID tries to match the starting address of the BASIC source number. A breakpoint set at anything other than the starting address of a BASIC source line must be deleted by its address.
G: Continuing Program Execution from a Specified Place
Use the G command to go to the line or address specified and to execute the program from that point. The syntax is as follows:
address
|
line GH: Displaying Program Information
Use the H command to display the version of BASIC used to compile the program, the number of constants used, the number of local variables used, the number of subroutine arguments passed, the object code size, and what procedure RAID was in when the program failed (main program versus subroutine).
I: Executing the Next Object Code Instruction
Use the I command to display and execute the next object code instruction. The syntax is as follows:
[
n]
IIf you use the n option, RAID displays and executes the next n instructions.
L: Displaying the Next Line
Use the L command to display the next line to be executed.
M: Setting Watchpoints
Use the M command to set watchpoints. The syntaxes are as follows:
variable M
[
;[
variable]
M …]
variable =VALUE M
variable is a variable found in the symbol table.
VALUE is the value that you want to break.
The second syntax lets you set a watchpoint for a variable set to a specific value.
A watchpoint condition occurs when RAID monitors a variable until the variable’s value changes. The program then suspends operation and displays the variable’s old value, its new value, and the source instruction that caused the change to occur.
If no change occurs, no display appears. This command accepts up to eight vari-ables. To continue monitoring a variable after RAID has already displayed a change to that variable’s value, you need only enter M again, not variable M.
Q: Quitting RAID
Use the Q command to quit RAID.
R: Running the Program
Use the R command to run the program until RAID encounters a breakpoint, or until completion. The R command is the same as the C command. The R command turns off verbose mode (use the V command to enter verbose mode). If you specify the TRAP command line option, RAID is entered at every nonfatal error.
S: Stepping Through the Source Code
Use the S command to execute the current line and display the next line of source code. Use multiple S commands to step through the program. The syntax is as follows:
[
n]
S[
*]
If the line includes a subroutine call, RAID steps into the subroutine. If you use the n option, RAID steps through the next n lines. If you use the * option, RAID steps around any subroutine call, essentially treating the entire subroutine as a single line. That is, the S* command instructs RAID to display and execute a source line.
If the line includes a subroutine call, RAID executes the subroutine and displays the first source line occurring after the subroutine returns.
T: Displaying the Call Stack Trace
Use the T command to display the call stack trace. It displays the names of the routines that have been called up to the current subroutine.
V: Entering Verbose Mode
Use the V command to enter verbose mode for the M command. In verbose mode RAID displays every source code line until a watchpointed variable’s value changes. The program then breaks and displays the variable’s old value, its new value, and the source code line that caused the change. To use this command, you must follow it with an M command: