I build my Visual Cobol application in Release mode and when i'm running it from command line the execution stops on a cbl_debugbreak call asking me if i want to start the debugger. Is it possible to disable that call when i'm running a release build?

  • Hello,

    The only way to disable the prompt to debug is to remove the actual CALL "CBL_DEBUGBREAK" in your program source or the compiler directive INITCALL(CBL_DEBUGBREAK). You will then need to rebuild your application.


  • Another way to proceed is to execute CBL_DEBUGBREAK based on the value/presence of a environment variable.
    Something like IF pgm_DEBUG=Y[es]  then execute CBL_DEBUGBREAK.  

  • Verified Answer

    You can also use conditional compilation so that the statement is included in the compile only if a particular constant is set in that configuration.

    So if you used:

              display "in test"

          $if DEBUG = 1    

              call "CBL_DEBUGBREAK"


              display "after break"

              accept any-key


    And in your Debug Configuration you added the directive:


    And in your Release Configuration you added the directive:


    Then the statements between the $if and the $end would only be compiled when the debug configuration was in effect.