IBM AS/400 Frozen Dessert Maker User Manual


 
Setting and Removing Breakpoints
is shown with the source positioned at the line where the breakpoint occurred. This
line is highlighted. At this point, you can evaluate fields, set more breakpoints, and
run any of the debug commands.
You should know the following characteristics about breakpoints before using them:
When a breakpoint is set on a statement, the breakpoint occurs
before
that
statement is processed.
When a statement with a conditional breakpoint is reached, the conditional
expression associated with the breakpoint is evaluated
before
the statement is
processed. If the expression is true, the breakpoint takes effect and the
program stops on that line.
If the line on which you want to set a breakpoint is not a runnable statement,
the breakpoint will be set on the next runnable statement.
If a breakpoint is bypassed that breakpoint is not processed.
Breakpoint functions are specified through debug commands. These functions
include:
Adding breakpoints to program objects
Removing breakpoints from program objects
Displaying breakpoint information
Resuming the running of a program object after a breakpoint has been
reached
You can either have a job or thread breakpoint on a specified position at
the same time, but not both.
If you change the view of the module after setting breakpoints, then the line
numbers of the breakpoints are mapped to the new view by the source debugger.
If you are debugging a module or program created with a statement view, then you
can set or remove breakpoints using statement numbers obtained from the compiler
listing. For more information on using statement numbers, see “Setting and
Removing Job Breakpoints Using Statement Numbers” on page 185.
Setting and Removing Unconditional Job Breakpoints
You can set or remove an unconditional Job breakpoint by using:
F6 (Add/Clear breakpoint) or F13 (Work with module breakpoints) from the
Display Module Source display
The BREAK debug command to set a job breakpoint
The CLEAR debug command to remove a jobbreakpoint
The Work with Module Breakpoints display.
The simplest way to set and remove an unconditional job breakpoint is to use F6
(Add/Clear breakpoint). The function key acts as a toggle and so it will remove a
breakpoint from the line your cursor is on, if a breakpoint is already set on that line.
To remove an unconditional job breakpoint using F13 (Work with module break-
points), press F13 (Work with module breakpoints) from the Display Module Source
178 ILE RPG for AS/400 Programmer's Guide