CL Command Reference - STRDBG
CL Command List > STRDBG Reference
Description:
The Start Debug (STRDBG) command puts a job into debug mode and, optionally, adds as many as 20 programs and 20 service programs and 20 class files to debug mode. It also specifies certain attributes of the debugging session. For example, it can specify whether database files in production libraries can be updated while in debug mode.
The graphical system debugger will be launched instead of the traditional system debugger if the STRDBG command is issued by a user registered for graphical debugging.
Debug can operate in three environments at the same time. They are OPM (Original Program Model), ILE (Integrated Language Environment), and JAVA. Some parameters for this command are applicable for all three environments. Some parameters for this command are applicable only for OPM, ILE, or JAVA. There will be a statement in each parameter description stating the environment in which the parameter is applicable.
The Change Debug (CHGDBG) command can be used later in the job to change the attributes of the debug mode. Also, OPM programs can be added to or removed from the debugging session if they are specified in the Add Program (ADDPGM) or Remove Program (RMVPGM) commands. OPM programs added with the ADDPGM command will be in the OPM debug environment.
When one job is servicing another job, and STRDBG is entered, all debug commands are valid for the job being serviced. If that job is held on a job queue, no further debug commands may be entered until that job is allowed to run. When the job starts, an initial breakpoint screen is displayed. From this screen, additional debug commands may be entered. To service another job, see the STRSRVJOB (Start Service Job) command.
Restrictions:
. You cannot use this command in debug mode. To end debug mode, refer to the End Debug (ENDDBG) command.
. You cannot use this command if you are servicing another job, and that job is held, suspended, or ending.
. This command is shipped with public *EXCLUDE authority and the QPGMR, QSRV, and QSRVBAS user profiles have private authorities to use this command.
. You must have either *CHANGE authority to the program, or *USE authority to the program and *SERVICE special authority.
Examples:
Example 1: Start Debug for Program
STRDBG PGM(TESTLIB/PAYROLL) UPDPROD(*NO)
This command starts debug mode to debug the program PAYROLL, which is in the test library TESTLIB. If tracing is used, up to 200 trace statements can be stored in the trace before tracing stops. If program PAYROLL is a bound program, the Display Module Source display will be shown, giving the source for the module that contains the program entry point. Any database files updated by the PAYROLL program must be in a test library.
Example 2: Start Debug for Class File
STRDBG CLASS(¡¯financial.payapplet¡¯)
This command starts debug mode to debug the class payapplet in the financial package.