To launch a debug process using Wait for debuggable attachment

Restriction: This topic applies to native code only.
  1. From the Solution Explorer, double-click the Properties entry, and select the Debug tab.
  2. Set Launch to Wait for debuggable attachment and choose an appropriate option from the corresponding list:
    • Wait for any program - waits for and then attaches to the next COBOL program that calls CBL_DEBUGBREAK, or is launched with the COBSW environment variable set to +A.
    • Wait for directory - waits for and then attaches to the next COBOL program that is launched with its working directory set to either the folder specified in Working Directory, or a subfolder of it. If no working directory is specified then the project output path is used.
    • Wait for ID - waits for and then attaches to the next COBOL program which calls CBL_DEBUG_START with the identifier you specify in the ID field as an argument. You set the identifier in the source code - see CBL_DEBUG_START.
  3. Save your changes.
  4. If using the Wait for any program or Wait for ID option, insert a CBL_DEBUGBREAK library routine into your COBOL program where you want to launch an attachment, and recompile.
  5. Click Debug > Start Debugging.

    The IDE now waits for and then attaches to the next program identified by the option selected.

  6. Start a program or a service.

    The debugger attaches to it at the specified point.