IBM AS/400 Frozen Dessert Maker User Manual


 
Adding/Removing Programs from a Debug Session
Changing the debug options using the SET debug command affects the value for
the corresponding parameter, if any, specified on the STRDBG command. You can
also use the Change Debug (CHGDBG) command to set debug options. However,
the OPMSRC option can not be changed by the CHGDBG command. OPMSRC
can only be changed by the debug SET command.
Suppose you are in a debug session working with an ILE program and you decide
you should also debug an OPM program that has debug data available. To enable
the ILE source debugger to accept OPM programs, follow these steps:
1. After entering STRDBG, if the current display is
not
the Display Module Source
display, type:
DSPMODSRC
The Display Module Source display appears.
2. Type
SET
3. The Set Debug Options display appears. On this display type Y (Yes) for the
OPM source debug support
field, and press Enter to return to the Display
Module Source display.
You can now add the OPM program, either by using the Work with Module display,
or by processing a call statement to that program.
Adding/Removing Programs from a Debug Session
You can add more programs to, and remove programs from a debug session, after
starting a debug session. You must have *CHANGE authority to a program to add it
to or remove it from a debug session.
For ILE programs, you use option 1 (Add program) on the Work with Module List
display of the DSPMODSRC command. To remove an ILE program or service
program, use option 4 (Remove program) on the same display. When an ILE
program or service program is removed, all breakpoints for that program are
removed. There is no limit to the number of ILE programs or service programs that
can be in or removed from a debug session at one time.
For OPM programs, you have two choices depending on the value specified for
OPMSRC. If you specified OPMSRC(*YES), by using either STRDBG, the SET
debug command, or CHGDBG, then you add or remove an OPM program using the
Work With Module Display. (Note that there will not be a module name listed for an
OPM program.) There is no limit to the number of OPM programs that can be
included in a debug session when OPMSRC(*YES) is specified.
If you specified OPMSRC(*NO), then you must use the Add Program (ADDPGM)
command or the Remove Program (RMVPGM) command. Only 20 OPM programs
can be in a debug session at one time when OPMSRC(*NO) is specified.
Note: You cannot debug an OPM program with debug data from both an ILE and
an OPM debug session. If OPM program is already in an OPM debug
session, you must first remove it from that session before adding it to the
ILE debug session or stepping into it from a call statement. Similarly, if you
want to debug it from an OPM debug session, you must first remove it from
an ILE debug session.
172 ILE RPG for AS/400 Programmer's Guide