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

Note: The information in this topic applies to both native COBOL and .NET COBOL applications unless specifically indicated. If you want to use native COBOL in containers, however, Micro Focus recommends using the IDE-based functionality described in Debugging and Running Native COBOL Applications in Containers as it offers an fully-integrated, easy-to-use debugging experience.
  1. Open the application's solution in Visual COBOL.

    If you are working with one of the container 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. Select Executable from the Launch drop-down list.
    4. In the Executable 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

    5. Check Use remote machine.
    6. In the adjacent field, specify the container's ID or IP address.
    7. 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.