JetBrains Rider 2018.2 Help

Evaluating Expressions

JetBrains Rider enables you not only view values of separate variables, but also evaluate more complex expressions. For example, you can enter the following expression to identify whether a string contains a particular character: myString.Contains("a");

debug evaluate expression

Please note that the expression evaluation feature has a number of limitations:

  • A method can be invoked within the Expression Evaluation dialog only if the debugger has stopped at a breakpoint, but has not been paused.

  • Expression Evaluation can only be "single-level". In other words, if JetBrains Rider stops at a breakpoint within a method called from the Expression Evaluation, you cannot use the Expression Evaluation feature again.

To evaluate an arbitrary expression

  1. Open the Evaluate Expression dialog box in one of the following ways:
    • Choose Run | Evaluate Expression from the main menu.

    • Press Alt+F8.

    • To evaluate a specific variable, select it on the Variables pane of the Debug tool window, then choose Run | Evaluate Expression or press Alt+F8.

  2. In the Expression field, type the expression in question or choose one of the previously evaluated expressions from the drop-down list.

    If you have selected a specific variable on the Variables pane, this variable will be displayed in the Expression text box.

  3. Click the Evaluate button. The Result read-only field shows the evaluation output. If the specified expression cannot be evaluated, the Result field explains the reason.

Note that you can add the evaluated expression to a list of watches by pressing Ctrl+Shift+Enter in the Evaluate Expression dialog.

Last modified: 21 December 2018