Stepping Through an Expression

See Also

When you are in a debugging session, you can use the Step Over Expression command to step through an expression and view the values returned by each method call in the expression.

You can use the Step Over Expression command to achieve a more fine-grained stepping than other debugging steps. Step Over Expression enables you to proceed through each method call in an expression and view the input parameters and resulting output values of each method call. You can invoke the Step Over Expression command just as you would any other step commands. If there are no further method calls, Step Over Expression behaves like the Step Over command.

Each method call in an expression has some input (parameters) and output values. Each time you use the Step Over Expression command in an expression, the debugger resumes VM execution and then stops before executing the next method call. You can inspect the output values for the previous method and the input parameters for the next method in the Variables window. Invoking Step Over Expression again resumes the VM execution until the next method call in the expression.

To step through an expression:

  1. Place a breakpoint in the line containing the expression you want to debug and start the debugging session.

    When you start the debugger, the VM stops before executing any of the method calls in the expression.

  2. Choose Debug > Step Over Expression (Shift-F8) from the main menu.

    When you invoke Step Over Expression, the debugger steps to the first method call in the expression but does not execute the method. The Variables window displays the input parameters of the method.

  3. Invoke Step Over Expression again to execute the first method and step to the next method call in the expression.

    In the Variables window, you can view the output values of the executed method and any input parameters for the next method in the expression.

    In the Source Editor, the executed method call is underlined and the next method call in the expression is highlighted. You can mouse over the executed method to display a tooltip and view the output values.

  4. Invoke Step Over Expression again to step to the next method call in the expression.

    In the Variables window, you can view the output values under the Return Values node.

See Also
Stepping Through Your Program
Evaluating an Expression
About Debugging Applications

Legal Notices