While using the Expression Evaluation feature, be aware of the following:
- 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 be only "single-level". In other words, if RubyMine stops at a breakpoint within a method called from the Expression Evaluation, you cannot use the Expression Evaluation feature again.
- In the Frames pane, select the thread where you want an expression to be evaluated.
- Invoke the Evaluate Expression in one of the following ways:
- On the main menu, choose
- On the context menu of the editor, choose
- Press Alt+F8Alt+F8
- Click on the stepping toolbar of the Debug tool window.
If you have assigned a label to a variable, object, or watch, you can reference it by this label as if it were a local variable <label-name>_DebugLabel defined in the same context where the expression is evaluated. RubyMine also displays this label in the completion suggestion list.
- Click Evaluate.
If the specified expression cannot be evaluated, the possible reason will be briefly described in the
Result pane of the dialog box:
During the debugger session, the value of any expression at caret is shown at the tooltip every time you hover your mouse pointer over it. If an expression contains children, clicking expands the node and displays all children.
However, Quick evaluate expression helps you view the expression value using the keyboard only.