Does Eclipse have an analog to Visual Studio's "Immediate Window", a window where I can evaluate statements while in the debugger?
Asked
Active
Viewed 2.5k times
92
-
7Please 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 Answers
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
-
19i would recommend updating this as the correct answer as it is much closer to the immediate window than the "expressions view". – Michal Aug 05 '09 at 09:00
-
-
4Select the statement, right-click and then Execute. You can also press the little play button on the display toolbar. – Doguhan Uluca May 09 '11 at 00:37
-
1
-
2Do function calls work in the display window? They don't seem to work for me, or maybe I am misunderstanding how they work. If I enter a function name and hit enter, it doesn't display the return value. – Setafire Jun 06 '16 at 23:44
-
3
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
-
1
-
1while the answer is correct, in some way, Todds answer is better, as he provied a more exact analogy for VS Immediate Window – K.L. Nov 15 '12 at 13:01
-
1auto-completion doesn't seem to work in the expression window. it's not convenient for evaluating snippets while debugging. – nakhli Apr 09 '13 at 08:47
-
-
Expression does not work exactly like immediate window in Visual Studio, Todd's answer is much better and should be taken as answer. – mhan0125 Dec 06 '17 at 21:17
-
I think I should downvote this answer in favor of the next one about the Display window – João Antunes Feb 15 '18 at 10:55
5
Inspect ctrl-shift-i or Display ctrl-shift-d?

Trevor Harrison
- 1,744
- 1
- 14
- 20
-
6To 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