Debugging ESQL

When message flow processing has paused at a breakpoint that you have set in source code within a node that contains ESQL code, you can examine and modify the ESQL variables in the Flow Debugger.

Before you begin

Complete the following tasks:

About this task

You can browse ESQL variables in the Variables view in the Debug Perspective, and change their associated data values. You can also set breakpoints on lines in the ESQL code. See the following sections for further details:

Using breakpoints on ESQL code lines

Procedure

  1. Switch to the Debug perspective.
  2. Open the ESQL editor.
  3. Right-click a line where you want to set a breakpoint.

    You cannot set a breakpoint on a comment line or a blank line.

  4. Select from the menu to create, delete, or restrict the breakpoint, in a similar way to normal debugger breakpoints, as described in Working with breakpoints in the flow debugger.

Working with ESQL variables

Procedure

  1. Switch to the Debug perspective.
  2. Open the Variables view.
    Variables are shown in a tree, using the symbol Variable.
  3. To work with a variable, right-click it and select an option from the pop-up menu.

    You cannot update message trees, or REFERENCE variables.

    For example, if you have declared the following ESQL variables, you can change their values in the debugger:

    DECLARE myInt INT 0;
    DECLARE myFloat FLOAT 0.0e-1;
    DECLARE myDecimal DECIMAL 0.1;
    DECLARE myInterval INTERVAL DAY TO MONTH;

Results

Message flow processing continues until the next breakpoint that is set in the logical processing of the current message. If there is no further enabled breakpoint at which the flow instance can pause, processing runs to completion and the flow instance is removed from the Debug view.

What to do next

If you have finished debugging this message flow, you can remove the breakpoints, or end the debugging session: