92

Does Eclipse have an analog to Visual Studio's "Immediate Window", a window where I can evaluate statements while in the debugger?

Simeon Pilgrim
  • 22,906
  • 3
  • 32
  • 45
Justin R.
  • 23,435
  • 23
  • 108
  • 157
  • 7
    Please accept Todd's answer as the accepted answer, AdamC's is useful but is more analogous to the Watch Window, whereas Todd has found the actual analog to the Immediate window – STW Jun 26 '12 at 17:09

3 Answers3

137

Yes. The view name is "Display".

Window->Show View->Other It is under the Debug folder.

Once in there you evaluate statements while in the debugger.

Todd
  • 30,472
  • 11
  • 81
  • 89
65

Eclipse has a really cool concept call Scrapbook Pages where you can evaluate statements even when you're not debugging. However, if you want to eval code using values from the current program, go to Window->Show View->Expressions. There you can put in any expression you want and track it as your program executes.

AdamC
  • 16,087
  • 8
  • 51
  • 67
5

Inspect ctrl-shift-i or Display ctrl-shift-d?

Trevor Harrison
  • 1,744
  • 1
  • 14
  • 20
  • 6
    To clarify, you can highlight some code within the debugger and hit ctrl+shift+i or right-click->inspect to see the evaluation of the code – Rich Seller Jul 11 '09 at 21:47