Skip to main content

Debugging Production Code

Debugging Production Code

The first step in debugging is to enable tracing as described in Monitoring Ensemble Productions. If this does not reveal the problem, you can step into the code using the debugger, as follows:

  1. Using Studio, insert the BREAK command where you want to start debugging.

  2. Enable the Foreground setting for the business host that uses the class you want to debug.

  3. Start the production. The job that you marked in Step 2 runs in the foreground in the Terminal.

  4. When that BREAK command is reached, the Terminal enters debug mode and you can step through the code.

For details, see “Command-Line Routine Debugging” in Using Caché ObjectScript.

You can also debug your code in Studio:

  • With a business service, you still specify that it should be run in the foreground and use a BREAK to get the process ID.

  • With a business process, you can use Studio to set a breakpoint and then attach to the process to debug using Studio. In contrast, if you use BPL, Studio displays in .INT code.

  • With a business operation, you can use Studio to set a breakpoint and then attach to the operation process to debug.

For details, see “Using the Studio Debugger” in Using Studio.

FeedbackOpens in a new tab