Before you can debug a load module that runs in MVS™ batch or TSO, you must build the code with debug information. For either COBOL or PL/I source files, the required compiler option is TEST.
An alternative way to start debugging a load module in MVS batch or TSO is to explicitly submit execution JCL that includes the TEST runtime option. The execution step may be the last in a compile, link, and go sequence, as described in Building a z/OS project or MVS subproject.
If a load module is compiled with debug information and if the debug daemon is listening in the workbench, a debug session begins in the Debug perspective as soon as the load module is executed with the TEST runtime option.