Debug mode is a special environment in which the testing functions can be used in addition to the normal system functions.
To begin testing, your program must be put in debug mode. Testing functions cannot be used outside debug mode. To start debug mode, you must use the Start Debug (STRDBG) command. In addition to placing your program in debug mode, the STRDBG command lets you specify certain testing information such as the programs that are being debugged. Your program remains in debug mode until an End Debug (ENDDBG) or Remove Program (RMVPGM) command is encountered or your current routing step ends.
Note: If the System Debug Manager function in iSeries™ Navigator has been used to select Debug in order to check the system, then issuing the Start Debug (STRDBG)) command will cause the graphical interface to be presented. In this case, whenever one of the users specified in the user list issues the Start Debug (STRDBG) command, they will see the iSeries Navigator System Debug Manager rather than the Command Entry display. If the End Debug (ENDDBG) command is entered and Debug in the System Debug Manager is not currently selected, then issuing the Start Debug (STRDBG) command will again start the system debugger using the Command Entry display.
The following Start Debug (STRDBG) command places the job in debug mode and adds program CUS310 as the program to be debugged.
STRDBG PGM(CUS310)
You can use the ILE source debugger to debug OPM programs. To create OPM programs that contain source debug data, specify the OPTION(*SRCDBG) parameter or the OPTION(*LSTDBG) parameter on the Create CL Program (CRTCLPGM) command. The source debug data is actually part of the program object.
To add OPM programs that get created containing source debug data to the ILE source debugger, use the Program (PGM) and OPM Source Level Debug (OPMSRC) parameters on the 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)