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.
-
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.
- Configure your project for debugging an application running in a container as follows:
- Navigate to your project's properties - click
Project > Properties.
- Go to the
Debug tab.
- Select
Executable from the
Launch drop-down list.
- 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
- Check
Use remote machine.
- In the adjacent field, specify the container's ID or IP address.
- 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.
- Click
Debug > Start Debugging.
Visual COBOL connects to the running container and debugging starts as normal.