To start debugging a COBOL application that is not yet running in a container

  1. Open the application's solution in Visual COBOL.

    If you are working with one of the Docker demonstrations, they include the relevant solution and project files.

  2. If your application does not have any breakpoints set in it, you might want to set one at an appropriate point, then save the change.
  3. Configure your project for debugging an application running in a container as follows:
    1. Navigate to your project's properties - click Project > Properties.
    2. Go to the Debug tab.
    3. In the Start Action group:
      1. Select Start external program.
      2. In the adjacent field, specify the application to be run in the container's Docker working directory.

        For example, for the container that would have been started by the docker run command in Running a Container that is to be Debugged you would specify the following:

        c:\app\exe-name.exe

    4. In the Start Options group:
      1. Check Use remote machine.
      2. In the adjacent field, specify the container's ID or IP address.
      3. In the Port field, specify the port that the container is listening on. This would be 6100 for the container that would have been started by the docker run command in Running a Container that is to be Debugged.
  4. Click Debug > Start Debugging.

    Visual COBOL connects to the running container and debugging starts as normal.