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 Start of changeIBM Developer for z Systems®End of change for debugging programs that run on z/OS®.

Note: Start of changeIBM Debug for z Systems supersedes IBM Debug Tool for z/OS. Not all references to IBM Debug Tool for z/OS have been changed in the COBOL documentation library. You can continue to use IBM Debug Tool for z/OS V13.1 for debugging most COBOL applications. However, the latest version of IBM Debug for z Systems is required when using new debugging features available in Enterprise COBOL V6. To find out which IBM debug product best suits your needs, see https://www.ibm.com/support/knowledgecenter/SSQ2R2_14.0.0/com.ibm.debugtool.doc/common/dcompo.html.End of change

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