Debugging Using a Core Dump

Restriction: This topic applies to native COBOL only.

When an application crashes or when you programmatically invoke a core dump, you can arrange for its state to be saved to a core file, which contains source code error details including the contents of memory at the time of the error, and the values of any variables and expressions set at the time. You can then use the core file to help debug any problems.

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 cblcored command-line utility, 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 must be installed along the same path in both environments.

If you do not have the required .idy file, the IDE indicates that no source is available.

Notes:
  • 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 create a 64-bit project configuration or select x64 as the Platform target on the COBOL tab in the project's properties.
  • 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.