IBM AS/400 Frozen Dessert Maker User Manual


 
Setting and Removing Watch Conditions
To remove a conditional thread breakpoint using the Work with Module Breakpoints
display:
1. Type 4 (Clear) in the
Opt
field next to the breakpoint you want to remove.
2. Press Enter.
Using the TBREAK or CLEAR Debug Commands
You use the same syntax for the TBREAK debug command as you would for the
BREAK debug command. The difference between these commands is that the
BREAK debug command sets a conditional job breakpoint at the same position in
all threads, while the TBREAK debug command sets a conditional thread break-
point in the current thread.
To remove a conditional thread breakpoint, use the CLEAR debug command.
When a conditional thread breakpoint is removed, it is removed for the current
thread only.
Removing All Job and Thread Breakpoints
You can remove all job and thread breakpoints, conditional and unconditional, from
a program object that has a module object shown on the Display Module Source
display by using the CLEAR PGM debug command. To use the debug command,
type:
CLEAR PGM
on the debug command line. The breakpoints are removed from all of the modules
bound to the program.
Setting and Removing Watch Conditions
You use a watch condition to monitor if the current value of an expression or a
variable changes while your program runs. Setting watch conditions is similar to
setting conditional breakpoints, with one important difference:
Watch conditions stop the program as soon as the value of a watched
expression or variable changes from its current value.
Conditional job breakpoints stop the program only if a variable changes to the
value specified in the condition.
The debugger watches an expression or a variable through the contents of a
storage address, computed at the time the watch condition is set. When the
content at the storage address is changed from the value it had when the watch
condition was set or when the last watch condition occurred, the program stops.
Note: After a watch condition has been registered, the new contents at the
watched storage location are saved as the new current value of the corre-
sponding expression or variable. The next watch condition will be registered
if the new contents at the watched storage location change subsequently.
188 ILE RPG for AS/400 Programmer's Guide