Debug Native COBOL applications Running in an Enterprise Server

You can debug a native COBOL application which runs under Micro Focus Enterprise Server. The application's executable runs in the enterprise server instance either on the same, or on a remote machine. In order to debug the application:

  1. Ensure that the enterprise server instance is running. You can do this in the Enterprise Server Common Web Administration (ESCWA).

    You can access ESCWA on the machine that has Enterprise Server installed at the following address: http://localhost:10086 (or https://localhost:10086, if Enterprise Server has certain security features enabled).

    1. Click the NATIVE tab in the UI.
    2. From the pane on the left, expand Directory Servers.
    3. Click the server you want to start, and click the Start button next to its name.

    For more information about ESCWA, see the Enterprise Server product Help.

  2. Ensure that the application sources are stored on your local machine. Open the folder that contains the source files in Visual Studio Code.
  3. Click Debug > Start Debugging.

    This creates a launch configuration file, launch.json.

  4. Add the COBOL (native): Enterprise Server configuration to the launch.json file:
            {
                "type": "cobol",
                "request": "launch",
                "name": "COBOL (native): Enterprise Server",
                "enterpriseServer": {
                    "serverName": "Please enter the name of the server to debug.",
                    "serverAddress": "Please enter the address of the 'mfcs-mp' or 'soap' listener for the server. eg tcp:127.0.0.1:<nnn>."
                }
            },

    Edit the values for serverName and serverAddress as follows:

    • serverName - the name of the enterprise server instance as it appears in the list of Directory Servers inside the Enterprise Server Common Web Administration (ESCWA).
    • serverAddress - the address of the mfcs-mp listener property of the enterprise server instance. To get its address:
      1. In ESCWA, click the NATIVE tab in the UI.
      2. From the pane on the left, expand Directory Servers and select your Enterprise Server instance.
      3. From the General drop-down list, select Listeners.
      4. Under Communication Processes, click Web Services and J2EE.
      5. In the Listener Properties pane, note and copy the entire string in the Address field - e.g. tcp:198.0.0.1:9003.
  5. Select COBOL (Enterprise Server) from the configuration launcher, and click (Start Debugging).