ILE C/C++ Programmer's Guide


Adding and Removing Programs from a Debug Session

If you have *CHANGE authority, you can add programs and service programs to a debug session, or remove them from a current debug session.

For ILE programs, use option 1 (Add program) on the Work with Module List display (F14) 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 included in 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 Change Debug (CHGDBG) options, 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.

Example:

This example shows you how to add an ILE C service program to, and remove an ILE C program from a debug session.

Note:
Assume the ILE C program T1520ALP is part of this debug session, and the program has been debugged. It can be removed from this debug session.
  1. To add programs to or remove programs from a debug session type:

    DSPMODSRC

    and press Enter. The Display Module Source display appears.

  2. Press F14 (Work with module list) to show the Work with Module List display.
  3. On this display type 1 (Add program) on the first line of the list to add programs and service programs to a debug session. To add service program T1520SP1, type T1520SP1 for the Program/module field, MYLIB for the Library field, change the default program type from *PGM to *SRVPGM and press Enter.
  4. On this display type 4 (Remove program) on the line next to each program or service program that you want to remove from the debug session.
  5. To remove program T1520ALP, type 4 next to T1520ALP, and press Enter.
  6. Press F12 (Cancel) to return to the Display Module Source display.

    If an ILE C/C++ program with debug data is in a debug session, the module with the main() function is shown (if it has a debug view). Otherwise, the first module bound to the ILE C/C++ program with debug data is shown.


[ Top of Page | Previous Page | Next Page | Table of Contents ]