To specify container information in debug and run configurations

Note: This topic only applies to using native COBOL applications and native COBOL Unit Test projects in containers. To use JVM COBOL applications in containers you need to use the functionality described in Debugging and Running JVM COBOL Applications in Containers.

Before you can debug or run your application in a container you might need to specify some container-related details for it. Some details are specified in the project's properties, but other details are specified on the Containers tab on the Debug Configurations and Run Configurations dialog boxes. In most cases you will not need to change these settings from their defaults.

The options on the Containers tab of the Debug Configurations and Run Configurations dialog boxes are as follows:

Run on machine where the project is located (default)
Specifies that the project is to use "build without containers" mode when debugging or running. See Different Ways of Building a Native COBOL Application in a Container for more information.
Use base stage from Dockerfile
Specifies that the project is to use "build on host" mode when debugging or running. See Different Ways of Building a Native COBOL Application in a Container for more information.
Container run parameters
Parameters to pass to Docker when running the container. If the Use base stage from Dockerfile option is being used, you must include the -v parameter to volume mount the folder containing the project's build output to the relevant folder in the container file system.
Debug port
The port number that Visual COBOL uses to connect to the container in order to debug it.
Use project Dockerfile
Specifies that the project is to use "build in container" mode when debugging or running. See Different Ways of Building a Native COBOL Application in a Container for more information.
Note:
  • When using the Use base stage from Dockerfile or Use project Dockerfile option, Visual COBOL creates a container for the debug or run operation then removes the container once the project finishes its execution.