To start debugging a .NET COBOL application that is already 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. Click Debug > Attach to Process.
  3. If the application to be debugged is native COBOL, in the Connection type field, specify Micro Focus transport.

    If the application to be debugged is .NET COBOL, in the Connection type field, specify Remote (no authentication) (if you invoked the remote debugger (msvsmon.exe) with the "/noauth" flag) or Default (if you are using authentication).

  4. In the Connection target field, specify the following:
    ID/IP-address:port[:32|:64]

    where:

    ID/IP-address
    is the container's ID or IP address.
    port
    is the port number 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.
    :32|:64
    is optional, indicating whether the container is running a 32-bit or 64-bit environment. If this parameter is not specified, the default is 64-bit.
  5. Check Show processes from all users.
  6. Click Refresh for Visual COBOL to list all processes that you can potentially connect to.
  7. Select the process to debug from the list.
  8. Click Attach.

    The debugger attaches to the running container and debugging starts as normal. Note that execution does not stop until the debugger encounters a breakpoint, an error occurs, or you press the break button.