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.
- 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.
- Click
Debug >
Attach to Process.
- 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).
- 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.
- Check
Show processes from all users.
- Click
Refresh for
Visual COBOL to list all processes that you can potentially connect to.
- Select the process to debug from the list.
- 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.