Once the program has been compiled in debug mode and linked, you can use CodeWatch to debug your program. To invoke CodeWatch, use one of the following command formats:
GUI CodeWatch:
java –jar cw_java.jar <pgm_name> -sessionlog <filename> -commands <commands>
where:
<pgm_name> | The name of program executable to debug. |
-sessionlog | The fully qualified file name to write the log of debugger commands issued and command output received during the debugging session. |
-commands | The list of debugger commands to execute upon CodeWatch start-up. Separate each command with a comma. |
Command-line CodeWatch:
cwcmd [-classic] [-x] [-e] [-srcpath [source_directory [:source_directory] ...]] [-stbpath [STB_directory [:STB_directory] ...]] [-path [directory [:directory] ...]] [-usrin filename] [-usrout filename] [-8bit] [program-name] [program-arguments]
where:
-e (echo) | Specifies that every debugger command entered echoes back to the terminal. |
-srcpath, -stbpath, and -path | Specify directory paths to be searched for source and STB files. See Searching for Source and STB Files for more information. |
usrin and -usrout | Specify files to redirect user program input from or output to, respectively. See Redirecting User Program I/O for more information. |
8bit | Allows CodeWatch to treat an extended set of ASCII characters as printable. See Extended ASCII Character Support for more information. |
program-name | The name of the executable file to be debugged. If the debugger is invoked without a program-name argument, the a.out file in the current directory is used if it exists; otherwise, CodeWatch starts without loading a file for debugging. |
program-arguments | Command-line arguments to be passed to the program. |
CodeWatch does not require a program to load for debugging when starting. However, on UNIX systems, CodeWatch first looks for a.out as the default program name. When CodeWatch comes up standalone, a LOAD or ATTACH command must be used to specify the program to be debugged.