Overview of Debugging and Running Native COBOL Applications in Containers

Note: This topic only applies to using native COBOL applications and native COBOL Unit Test projects in containers. To use JVM COBOL applications in containers you need to use the functionality described in Debugging and Running JVM COBOL Applications in Containers.

You debug and run a containerized native COBOL application or debug and run tests as part of a native COBOL Unit Test project in much the same way as you would debug and run a non-containerized native COBOL application but there are a few additional or different steps to consider. The process is as follows:

  1. Make sure you have the images that you will need. If you're going to be building you will need a Visual COBOL Build Tools for Windows image whereas if you're going to be running your application in a deployment environment you will need a COBOL Server image.

    See Running the Container Demonstration for the Visual COBOL Base Image for more information.

  2. Add a Dockerfile to your project.

    Visual COBOL can create a template Dockerfile for you or you can use your own if you already have one.

    See To add a Dockerfile to a native COBOL project for more information.

  3. Check that the container-specific details in your project properties are correct. See To specify project properties for containers for more information.
  4. Update your debug and run configurations to specify container-specific details.

    See To specify container information in debug and run configurations for more information.

  5. Check that the workspace is configured to use the required type of containers.

    See To specify the type of container to use for more information.

  6. Run or debug the project, or run unit tests. The general process for doing this is the same one you would normally use, but there are additional steps to perform depending on where your container will be running.

    See Debugging COBOL applications and To run a COBOL application on your local machine for information on the debugging process in general, and To debug or run a native COBOL application in a container, To debug or run a containerized native COBOL application running on Enterprise Server and To debug or run a containerized native COBOL application running under Kubernetes for container-specific debugging information.

  7. When you have finished debugging your project, build a deployment image for the project.

    See To build an image for deployment for more information.