After you create the debug view, you can begin debugging your application using the ILE source debugger.
To start the ILE source debugger, use the Start Debug (STRDBG) command. Once the debugger is started, it remains active until you enter the End Debug (ENDDBG) command.
Initially, you can add as many as twenty (20) program objects and twenty (20) service programs to a debug session. Do this by using the Program (PGM) and Service Program (SRVPGM) parameters on the STRDBG command. The program objects can be any combination of ILE or original program model (OPM) programs. To start a debug session with three program objects, type:
STRDBG PGM(*LIBL/MYPGM1 *LIBL/MYPGM2 *LIBL/MYPGM3) SRVPGM(*LIBL/SRVPGM1 *LIBL/SRVPGM2) DBGMODSRC(*YES)
After entering the Start Debug (STRDBG) command, the Display Module Source display appears for ILE program objects. The first module object bound to the program object with debug data is shown.
The option to use the ILE source debugger to debug OPM programs exists for users. OPM programs contain source debug data when created. Do this only by specifying either the OPTION(*SRCDBG) or the OPTION(*LSTDBG) parameter of the Create CL Program (CRTCLPGM) command. The source debug data is actually part of the program object.
To add OPM programs that are created containing source debug data to the ILE source debugger, use the Program (PGM) and OPM Source Level Debug (OPMSRC) parameters on the Start Debug (STRDBG) command. To start a debug session with an OPM program created with source debug data, type:
STRDBG PGM(*LIBL/MYOPMPGM) OPMSRC(*YES) DSPMODSRC(*YES)