To use CBL_DEBUGBREAK for debugging with Enterprise Server running as a system service

Note: To use this technique, the debugger and the process being debugged must be in the same security context. Also, note that you cannot use this technique on Windows Vista or later or with some earlier releases of Windows.

  1. In the Net Express IDE, click Tools > Enterprise Server Administration. This brings up the Home page of Enterprise Server Administration.
  2. Start the enterprise server:

    To start an enterprise server

  3. In the Net Express IDE, open the project containing the program you want to debug as a service.
  4. Click the source file for the program in the left-hand pane of the project view.
  5. Insert the following statement immediately after the entry point for the service:
    call "CBL_DEBUGBREAK"
  6. Close the program and rebuild the project.
  7. Deploy the service or application to the server, or if you have already deployed it, redeploy it (this involves deleting the deployed service):

    Note: Make sure you include the .idy files for the application in the set of files that you deploy.

  8. If your program is a service (Web Service or J2EE), as opposed to a CICS or JCL application, you will need to create a client program to submit requests for that service.

    To generate a COBOL client from a Web service interface

  9. Start the service or application on your enterprise server. How you do this depends on what type of application it is.

    For example:

  10. On the message saying a call to CBL_DEBUGBREAK has been detected, click Yes. A new Net Express Debugger session starts.
  11. You can now step through the deployed service in the usual manner.

Notes:

Related Topics: