Debugging COBOL Applications Running in Containers

This section of the documentation presents detailed information describing how you debug your COBOL applications that are running in Docker containers.

Note:
  • The information in this section applies to both native and managed COBOL unless specifically indicated. However, to be able to debug managed COBOL running in a container you must be using Visual Studio 2017 (or later).

To debug a containerized COBOL application you use Visual COBOL's remote debugging features. Remote debugging is not a technique specifically for containerized COBOL applications, and information on remote debugging in general is covered elsewhere in this documentation. See Remote Debugging of Native COBOL Applications for more information.

This section of the documentation covers information on remote debugging that is specifically related to containerized COBOL applications.

As described in Key Concepts When Using Docker for COBOL Application Development, there are two ways in which you can debug a COBOL application running in a container:

This section of the documentation assumes that you are using the first of these approaches, although the majority of the steps involved are the same for both approaches.

The process for debugging a COBOL application running in a container is as follows:

  1. Build the application (for debug) on the host computer using Visual COBOL.
  2. Run the Visual COBOL base image, making sure that you volume mount the directory containing the application's executable and debug files that you built in step 1.
  3. Find out the ID or IP address of the container.
  4. Start debugging remotely as you would normally (in a non-containerized environment), specifying the ID or IP address of the container to establish a connection between the debugger and the containerized application.

The following sections contain more information on each of these steps.