You cannot enable both Just-In-Time Debugging and Core Dump concurrently.
To debug a 64-bit core dump file with a project, first ensure that your source code is built for 64-bit. In the project's
properties, click
Micro Focus > Build Configuration > COBOL and click
64 bit.
(Windows)To create a core dump for an application running under IIS, the application must be run in the same user account as that being
used when enabling the core dump feature. For example, a core dump will not be produced for a CGI or ISAPI application running
under the default anonymous logon account.
Click
Run > Debug Configurations.
Click
COBOL Core Dump.
Select the configuration you want or enter a name for a new configuration.
On the
General tab, enter the following information:
COBOL Project
The project that will be used while debugging.
You can debug a core file without a project. You need to specify the location of the debug symbols file (.idy) on the other tabs of the debug configuration.
Connection Properties
Enter values for these fields if you want to debug your project or the application when it is running on a remote machine.
Remote Host
The name or IP address of the remote machine.
Specify the port on which cobdebugremote process will listen on the remote host
When you are debugging an application on a remote machine, the
cobdebugremote (Windows) or
cobdebugremote32 (UNIX) process (or
cobdebugremote64 for a 64-bit process) needs to be running on that machine.
1
If you are developing the application on the remote machine
If you are using
Visual COBOL Development Hub, the IDE starts the
cobdebugremote (Windows) or
cobdebugremote32 (UNIX) process (or
cobdebugremote64 for a 64-bit process) automatically on the remote machine when you start debugging. You do not need to select a port as a
random one is picked when the process starts, but if you select this option you can assign a specific port in the
cobdebugremote port field. If you do specify a port, the process starts automatically on that port.
If you are developing the application on the local machine and debugging remotely
You must first start the
cobdebugremote (Windows) or
cobdebugremote32 (UNIX) process (or
cobdebugremote64 for a 64-bit process) from a command prompt.
The process takes the following options:
no options
Starts the process and opens a random port for remote connections. The port number is displayed in the console.
machine=name
Specify the machine that the process is running on. Only valid with the
stop option.
port
port=nnnnn
Specify the port to use to listen for connection requests.
port=nnnnn-yyyyy
Specify the range of ports to use. If port
nnnnn is in use, the next port is tried until a free port is found. If no free ports are found in the range, the utility returns
an error.
Note: You must enter the same number you set as the
port option in the
cobdebugremote port field of your debug configuration.
repeat
After the debug session has been completed, start listening for another connection. If no option is specified, the process
exits after the debug session has completed.
stop
Causes the process that is listening on the port to exit. Must be used with the
port option. This is only valid when the process is waiting for a connection.
If you run the process with no options, you must enter the port number displayed in the console in the
cobdebugremote port field.
Use X Server
For SSH-only connection types (Micro Focus DevHub SSH Only), you do not need to use an X Server implementation to echo the remote program output back to your local machine; for simple
I/O programs, you can display the output in the Console view within the IDE. For more complex programs, you may still want
to use an X Server implementation, for a better display experience.
To direct the program output to the Console view, ensure
Use X Server is not selected. For other connection types, this option is unavailable, and an X Server implementation must be used.
X Server (DISPLAY)
If you are debugging an application on a remote UNIX machine using
Visual COBOL Development Hub, enter the identifier for the X server that will display the remote program output on a local Windows machine. The default value is
client machine name:0.0.
Before debugging, make sure that the X server is running and that the remote machine
xhost configuration has the correct access permissions. You can use the
xhost + command to add your host or username to the list of those permitted.
Core Dump File
Enter the location of where a core file is stored. If you only specify the directory, and no filename, Eclipse will prompt
you for the filename when the debugger starts. The filename is
cblcore (Windows), or
core or
core.<pid> (UNIX) by default, but you can change this using the core_filename run-time tunable.
Executables Location
Identify a working directory. You can set this automatically to whichever directory you chose to store the core file.
Debug Options
To ensure debugging works correctly, you must indicate when the application you are debugging is 64-bit.
On the
Source tab, ensure that the location of your source files is defined.
On the
Debug Symbols tab, specify the location of the debug symbols (.idy) files.
Click
Debug.
When the core file has been loaded, the Debug perspective is displayed, enabling you to see the state of the application at
the point the core dump was created. The statement that was being executed is highlighted in an editor and the call stack
is displayed in the
Debug view. Execution functions such as the step and resume functions are disabled as the application is not actually running.