Watch expressions in the EGL debugger

Use a watch expression to track the value of an expression during debug.

You can create a watch expression in two ways.
  • In the Variables view of the Debug perspective, right-click a variable and click Watch.
  • In the Expressions view, manually create a new expression.

Each time the debugger suspends processing, it evaluates all current watch expressions and displays the results in the Expressions view.

The following cautions and limitations are associated with watch expressions:
  • Only a single EGL statement can be evaluated. For example, if you enter the following line as a watch expression, only functionA() will be run:
    functionA(); functionB();
    However, you can have multiple functions within a single if statement:
    if(myVar > 0)
      functionA();
      functionB();
    end
  • Use caution when evaluating statements with side effects, such as function calls, which might be evaluated more times than you expect.

Compatibility

Table 1. Compatibility considerations for watch expressions
Platform Issue
JavaScript generation Watch expressions are not supported.