Starting the debugger automatically using just-in-time debugging

You can trigger debugging using the just-in-time debugging feature. When this is enabled, an application stops when a run-time error occurs or if the code contains CBL_DEBUGBREAK and CBL_DEBUG_START library routines, and Visual Studio starts the debugger.

  • For 32-bit applications, when your application fails, the COBOL debugger is invoked if it is not already running.
  • For 64-bit applications, Visual COBOL must be running and waiting for a debuggable attachment.

The debugger attaches to the failed process and the relevant line of source is highlighted. You can view the contents of data items and memory and step through the code using the standard debugging techniques.

By default, when just-in-time debugging launches Visual Studio, only the source file is opened and no associated project. This means that there are no background parse errors or warnings shown, and editing the source is impossible.