Note: This topic only applies to using
JVM COBOL applications in containers. To use native COBOL applications in containers you need to use the functionality described in
Debugging and Running Native COBOL Applications in Containers.
Once your
Visual COBOL Build Tools for Windows base image is running and you have found out its ID or IP address you are ready to use
Visual COBOL to connect to the container using java remote debugging.
If you have followed the steps outlined in
Building a
JVM COBOL Application that is to be Debugged in a Container,
Running a Container that is to be Debugged and
Finding the Details of a Container that is to be Debugged you will have a container that isn't yet running your
JVM COBOL application but is waiting for you to connect to it using
Visual COBOL.
- Open the application's project in
Visual COBOL.
If you are working with one of the container demonstrations, they include the relevant project files.
- Set a breakpoint on the line where you want execution to pause when you connect to the application.
- Create a new debug configuration:
- Click
Run > Debug configurations.
- In the left side pane of the
Debug Configurations dialog box double-click
Remote Java Application.
- Change the name from
New_configuration to something relevant to your application.
- In the
Connection Properties section:
- Specify the IP address of the container in the
Remote Host field.
Note: You can specify the container's ID instead of its IP address.
- In the
Port field, specify the port that the container is listening on. This would be 8000 for the container that would have been started
by the
docker run command in
Running a Container that is to be Debugged.
- Click
Debug.