IBM AS/400 Frozen Dessert Maker User Manual


 
Setting and Removing Breakpoints
Display Module Source
Program: DEBUGEX Library: MYLIB Module: DBGEX
84 *---------------------------------------------------------------
85 * Move 'a's to the data structure DS2. After the move, the
86 * first occurrence of DS2 contains 10 character 'a's.
87 *---------------------------------------------------------------
88 C MOVE *ALL'a' DS2
89
90 *---------------------------------------------------------------
91 * Change the occurrence of DS2 to 2 and move 'b's to DS2,
92 * making the first 10 bytes 'a's and the second 10 bytes 'b's
93 *---------------------------------------------------------------
94 C 2 OCCUR DS2
95 C MOVE *ALL'b' DS2
96
97 *---------------------------------------------------------------
98 * Fld1a is an overlay field of Fld1. Since Fld1 is initialized
More...
Debug . . . _________________________________________________________________
_______________________________________________________________________________
F3=End program F6=Add/Clear breakpoint F10=Step F11=Display variable
F12=Resume F17=Watch variable F18=Work with watch F24=More keys
Breakpoint added to line 88.
Figure 81. Setting an Unconditional Job Breakpoint
5. After the breakpoint is set, press F3 (Exit) to leave the Display Module Source
display. The breakpoint is not removed.
6. Call the program. When a breakpoint is reached, the program stops and the
Display Module Source display is shown again, with the line containing the
breakpoint highlighted. At this point you can step through the program or
resume processing.
Setting and Removing Unconditional Thread Breakpoints
You can set or remove an unconditional thread breakpoint by using:
The Work with Module Breakpoints display
The TBREAK debug command to set a thread breakpoint in the current thread
The CLEAR debug command to remove a thread breakpoint
| To set an unconditional thread breakpoint using the Work with Module Breakpoints
| display:
| Type 1 (Add) in the
Opt
field.
| In the
Thread
field, type the thread identifier.
| Fill in the remaining fields as if it were an unconditional job breakpoint.
| Press Enter.
Note: The
Thread
field is displayed when the DEBUG option on the SPAWN
command is greater than or equal to one.
The TBREAK debug command has the same syntax as the BREAK debug
command. Where the BREAK debug command sets a job breakpoint at the same
position in all threads, the TBREAK debug command sets a thread breakpoint in a
single thread — the current thread.
180 ILE RPG for AS/400 Programmer's Guide