Problem
The program is compiled with the ANIM and INITCALL(CBL_DEBUGBREAK) directives:
COBOL ProgramName.CBL ANIM INITCALL(CBL_DEBUGBREAK) [other-directives];
and linked with the full static runtime library:
CBLLINK -BSF ProgramName.OBJ
Running the program should pause with the following prompt:
"The Micro Focus COBOL RTS has detected a call to CBL_DEBUGBREAK. Would you like to invoke the debugger?"
Instead, it ignores the call to CBL_DEBUGBREAK and just runs through.
What is missing?
Resolution
By default, the support for debugging is not automatically included when linking the static runtime library from the command line. See the description below for linking with static runtime library, i.e. -B
-B[ c ][ D ] Link with static runtime library
- m = S for single-threaded, m = M for multi-threaded
- c = L for Lite, c = B for Base, c = F for Full
- D to include support for debugging
According to the above, the D option must be added to include support for debugging. Therefore, the CBLLINK command should be as follows:
CBLLINK -BSFD ProgramName.OBJ