Previous Topic Next topic Print topic


Entering CodeWatch Commands

Commands may be entered in either upper case or lower case. The debugger is not case-sensitive except when processing quoted literals. Commands will be shown in upper case in all command-line examples.

Enter the commands at the keyboard in response to the command-line prompt (CodeWatch>). For example, the PRINT command displays the current line from the source program:

CodeWatch> PRINT

Several commands can be entered on a single line, separated by semicolons, as shown in the following example:

CodeWatch> BREAKPOINT 25; EVALUATE DISTANCE

Using abbreviations, the previous command line can also be written as:

CodeWatch> B 25; E DISTANCE

Commands are executed one at a time, from left to right. If any command causes an error message to be displayed, the rest of the command line may be discarded. If any command causes the program to resume execution, the rest of the command line will be executed when the debugger resumes control. For example, the following series of commands will be executed only until CONTINUE is reached. EVAL COUNT is not executed until a breakpoint or other condition returns control to the debugger.

CodeWatch> B 93; FIND COUNT; CONTINUE; EVAL COUNT

If a command line is too long for a single line, it can be continued on the next line by entering a space and a percent character (%) as the last character on the line, followed by a carriage return. The percent character is not part of the command. It simply informs the debugger that you want to continue entering commands. The debugger prompts with ". . . >" indicating it is ready for the continuation of command input. For example:

CodeWatch> BREAKPOINT 123 [ STEP IN; FIND EXPENSES; % 
...> EVALUATE EXPENSES; CONTINUE ]
Previous Topic Next topic Print topic