Debug Commands
Many debug commands are available for use with the ILE source debugger.
For example, if you enter
break 10 on the debug
command line (and line 10 is a debuggable statement), the debugger
adds an unconditional breakpoint to line 10 of your source. Note:
- If line 10 is a blank line or a comment statement, the debugger will give an error.
- If line 10 is not a debuggable statement, such as a typedef statement, it will set the break point to the very next debuggable statement.
- Pressing the F6 key (while the cursor is on a debuggable command line) sets or clears a break point.
Debug data is created when you compile a
module with one of the following debug options:
*STMT*SOURCE*LIST*ALL
The debug commands and their parameters are entered on the Debug command line shown at the bottom of the Display Module Source display or the Evaluate Expression display. They can be entered in uppercase, lowercase, or mixed case.
The online information describes the debug commands, and shows their allowed abbreviations.
The debug commands are as follows:
- ATTR
- Displays the attributes of variables. The attributes are the size and type of the variable as recorded in the Debug Symbol table.
- BREAK
- Permits you to enter either an unconditional or conditional job breakpoint at a position in the program being tested. To enter a conditional job breakpoint, enter BREAK line-number WHEN expression.
- CLEAR
- Removes conditional and unconditional breakpoints; removes one or all active watch conditions.
- DISPLAY
- Displays the names and definitions assigned by using the Equate command. It also allows you to display a different source module than the one that is currently shown on the Display Module Source display. The module object must exist in the current program object.
- EQUATE
- Assigns an expression, variable, or debug command to a name for shorthand use.
- EVAL
- Displays or changes the value of a variable; displays the value of expressions, records, structures, or arrays.
- QUAL
- Defines the scope of variables that appear in subsequent EVAL or WATCH commands.
- SET
- Changes debug options, such as the ability to update production files; specifies whether find operations are to be case sensitive; enables OPM source debug support.
- STEP
- Runs one or more statements of the procedure that is being debugged.
- TBREAK
- Permits you to enter either an unconditional or conditional breakpoint in the current thread in a position, in the program being tested.
- THREAD
- Allows you to either open the Work with Debugged Threads display or change the current thread.
- WATCH
- Requests a breakpoint when the contents of a specified storage location is changed from its current value.
- FIND
- Searches
in the module that is currently displayed for a specified line number
or string of text. The text search can be specified in a forward or
backward direction from the position of the cursor on the displayed
view text. If the cursor is not on the view text, the search starts
at the first position of the top line of text on the current screen.
When the string is successfully found, the cursor will be positioned
on the first character of the found string.
The last Find command that is entered can be repeated by using the F16 Repeat Find key.
- UP
- Moves the displayed window of source towards the beginning of the view by the number of lines entered.
- DOWN
- Moves the displayed window of source towards the end of the view by the number of lines entered.
- LEFT
- Moves the displayed window of source to the left by the number of characters that are entered.
- RIGHT
- Moves the displayed window of source to the right by the number of characters that are entered.
- TOP
- Positions the view to show the first line.
- BOTTOM
- Positions the view to show the last line.
- NEXT
- Positions the view to the next breakpoint in the source that is currently displayed.
- PREVIOUS
- Positions the view to the previous breakpoint in the source that is currently displayed.
- HELP
- Shows the online help information for the available source debugger commands.