Debugging Services and Applications on Enterprise Server Using CBL_DEBUGBREAK

To debug a service using CBL_DEBUGBREAK using the default enterprise server ESDEMO, follow these steps:

  1. Start the server ESDEMO. You can do this either using the Web interface Enterprise Server Administration, or using the casstart command. For more information, see your Enterprise Server documentation.
  2. Insert the following line at the beginning of the Procedure Division of your program:
  3. Compile your program with a command such as:
    cob -ia myprog.cbl
  4. Deploy the service to ESDEMO, or if you have already deployed it, redeploy it (this involves deleting the deployed service). See the help topics To deploy a service interface using the deploy tool and To redeploy a service interface. Ensure that you also deploy the program's .cbl and .cpy source files and the .idy file, which is needed for debugging.
  5. Create a client program for your service. See the help topic To generate a COBOL client from a Web service mapping.
  6. Run the client program and enter some input.
  7. On the message saying a call to CBL_DEBUGBREAK has been detected, click Yes. The Character Animator starts, displaying the source of your program ready for debugging. You can now step through the deployed service in the usual manner.

Remember to remove the line that calls CBL_DEBUGBREAK when you have finshed debugging the service.

As an alternative to inserting the call statement, you can compile the program with the Compiler directive INITCALL"CBL_DEBUGBREAK", before you deploy it.