Using the Inspector Window

The Inspector window allows you to single out a selected variable, field or object, and display the same information that is available in the Watch or Data windows. For more information about this window including its context menu options, press press F1 or click Help in the Inspector window.

The Inspector window is slightly different from the other windows in that it floats by default, and you can have multiple instances of Inspector windows. Each Inspector window contains one data item.

To open the Inspector Window:

  1. Set at least one breakpoint in the Source Editor.
  2. Click debug_icon Debug from the toolbar.
  3. When the debugger reaches a breakpoint, select a variable in the Source Editor, right-click, and choose Inspect
    The Inspect dialog appears and contains the variable you selected. If you want to inspect something else, enter a new expression or variable in the text field, or select a previous one from the dropdown list.
  4. Click OK to open the Inspector window.

The Inspector window will appear floating in the center of your screen. You can dock the Inspector window. An inspector evaluates an expression according to the current context of the Stack window. If you move to a new context, the expression is reevaluated for the new context. If the execution point moves to a new location where any of the variables in the expression are undefined, the entire expression becomes undefined. If the execution point returns to a location where the expression can be evaluated, the inspector again displays the value of that expression.


Related topics

About Debugger Windows
Setting Preferences for the Debugger Windows
Using the Stack Window
Using the Watches Window
Using the Source Editor When Debugging
Using Acceptable Legal Java Expressions in the Debugger