Debugging using a core dump

Restriction: This topic applies to native COBOL only.

When an application crashes, produce a core file that contains all the necessary environmental details required to debug the application on a different machine. This is useful for applications failing in a production environment, which can then be debugged in a development environment.

Core dump debugging is useful when you have a failing application in a production environment, and you don't have Enterprise Developer installed. As long as you have access to the application's source files elsewhere, you can produce a core file via the CBL_CREATE_CORE library routine, the core_error run-time tunable, or the COBOL Core Dump debug configuration, and debug it.

To accurately debug using a core file, in your development environment, you must use the original source and .idy files used to create the executable in question, or failing that, you must ensure that the sources are in the same state (directive settings, optimization, etc.) as they were during the initial build. Also, as this process will most likely result in you moving from a production environment on one machine, to a development environment on another, any supporting files used by the application (shared libraries, shared objects, third-party libraries, etc., must be installed along the same path in both environments.

If you do not have the required .idy file, you are given the name of the source file or program where the error occurred.

Notes: The following apply to Windows environments only:
  • The core files created are Microsoft minidump files. If you have a mixed-language application, you can use a minidump file to debug the other languages involved.
  • It is not possible to enable both Just-In-Time Debugging and Core Dump concurrently.
  • To debug a 64-bit core dump you must first ensure the project is being built for 64-bit - navigate to Micro Focus > Build Configuration > COBOL in the project's properties and click 64 bit.
  • 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.
  • On Windows, the core files created by this product are Microsoft minidump files. If you have a mixed-language application, you can use the minidump file to debug the other languages involved.