System Debug Reference Manual (32650-90888)

Chapter 2 49
User Interface
Automatic DBUGINIT Files
All system process debugging uses the system console.
All job debugging uses the system console. The environment variable JOB_DEBUG
allows jobs to enter Debug.
The environment variable CONSOLE_DEBUG can be used to cause all processes that are
entering Debug for the first time to use the system console.
The environment variable CONSOLE_IO can be used to cause all debugging for the
current process to be directed to the system console.
The environment variable TERM_LDEV allows the use of any terminal for debugging. A
privileged procedure, DEBUG_AT_LDEV (ldev : ldev_type), is also available to
enter the debugger and direct I/O to the specified terminal LDEV.
When Debug is using the system console, the following technique is recommended to
prevent confusion while sharing the console with the CI:
$cmdebug > :restore
Running RESTORE prevents unwanted terminal reads from the console's CI.
See the ENV command for detailed descriptions of all of the environment variables
mentioned above.
Automatic DBUGINIT Files
Debug supports the automatic execution of commands within special initialization files
named DBUGINIT. These files must be in the form of a USE file as described by the USE
command.
Debug first tests for an initialization file (DBUGINIT) in the same group Uand account as
the program that is being debugged. Next, Debug looks for an initialization file in the
user's logon group and account (if different).
Based on the existence of these special files, it is possible to execute initialization
command files from both the program's group and account and the user's logon group and
account.
The following initialization sequence is possible for Debug:
1) DBUGINIT.ProgGrp.ProgAcnt (program group/account)
2) DBUGINIT.UserGrp.UserAcnt (user's group/account)
Refer to chapter 9 for a discussion of initialization files used for DAT.