Debugging

You can choose between two different approaches to determine the cause of problems in the behavior of your application: source-language debugging or interactive debugging.

For source-language debugging, COBOL provides several language elements, compiler options, and listing outputs that make debugging easier.

If the problem with your program is not easily detected and you do not have a debugger available, you might need to analyze a storage dump of your program.

For interactive debugging, you can use Debug Tool. Debug Tool offers these productivity enhancements:

  • Interactive debugging (in full-screen or line mode), or debugging in batch mode

    During an interactive full-screen mode session, you can use Debug Tool's full-screen services and session panel windows on a 3270 device to debug your program while it is running.

  • COBOL-like commands

    For each high-level language supported, commands for coding actions to be taken at breakpoints are provided in a syntax similar to that programming language.

  • Mixed-language debugging

    You can debug an application that contains programs written in a different language. Debug Tool automatically determines the language of the program or subprogram being run.

  • COBOL-CICS® debugging

    Debug Tool supports the debugging of CICS applications in both interactive and batch mode.

  • Support for remote debugging

    Workstation users can use the IBM® Debug Tool Plug-in for Eclipse or the IBM Problem Determination Tools with IBM Developer for z/OS® for debugging programs that run on z/OS.

Note: IBM Debug for z/OS supersedes IBM Debug for z Systems® and IBM Debug Tool for z/OS. Not all references to IBM Debug for z Systems and IBM Debug Tool for z/OS have been changed in the COBOL documentation library. It is recommended that you upgrade your debugger to the latest level in order to have the full range of debugging features available. In some cases, you must upgrade your debugger to a certain version depending on what level of Enterprise COBOL you are using to create the COBOL application:
  • IBM Debug Tool V13.1 supports Enterprise COBOL V5.1 and earlier versions
  • IBM Debug for z Systems V14.0 supports Enterprise COBOL V6.1 and earlier versions
  • IBM Debug for z Systems V14.1 supports Enterprise COBOL V6.2 and earlier versions
  • IBM Debug for z/OS V14.2 supports Enterprise COBOL V6.3 and earlier versions
To find out which IBM debug product best suits your needs, see https://www.ibm.com/support/knowledgecenter/SSQ2R2_14.2.0/com.ibm.debug.cg.doc/common/dcompo.html?sc=SSQ2R2_latest.

Related references  
Debug Tool Reference and Messages
Language Environment® Debugging Guide (Formatting and analyzing system
   dumps, Debugging example COBOL programs)