This page gives an overview of Ruby debugging inspection shortcuts.
Introduction
In a debug session the display view allows to enter arbitrary expressions and have them evaluated. Inspection shortcuts are a more convenient way to evaluate frequently used expression. They can be applied directly to a selection in the editor without using the Display view. The shortcuts are defined in Preferences->Ruby->Evaluation Expressions. There you can create, delete and modify expressions. Every expression has a name, description and ruby code. The ruby code may contain the placeholder %s which will be replaced with the selection before evaluation. There are some examples in the following table.
name | ruby code | explanation |
---|---|---|
Global variables | h={}; global_variables.each { |v| h[v] = eval(v) }; h | This is an expression without context |
instance methods incl. inherited | %s.class.instance_methods(true).sort | In this expression %s will be replaced with the current selection in the editor |