immediate window
Asked Answered
M

2

26

Is there anyplace in the eclipse ide that I can enter immediate code while stoped at a breakpoint?

thanks

Muimuir answered 6/1, 2010 at 15:39 Comment(0)
B
45

It's called the Display window in Eclipse. Menu Item: Window/Show View/Display

To run command you need to type then select the text in the display window and select one of the two J icons in the window.

Baucis answered 6/1, 2010 at 15:48 Comment(4)
Is there an option to execute the input without opening the context menu?Chinquapin
Does anyone know the keyboard shortcut to this J "execute" button?Spare
I'd hit a breakpoint, but the buttons were grayed out - seems you have to highlight the text (mentioned above but I missed it) to run it. (Via https://mcmap.net/q/535820/-eclipse-the-icons-in-quot-display-view-quot-are-all-greyed-out)Stapler
In Eclipse 2022-06, this window is called the Debug Shell.Eulaeulachon
F
21

Note: as mentioned in Debugging with the Eclipse Platform, you can use the Display View to scrapbook your live code.

Meaning, while you have a live debug session:

live debug session

, you can run/debug some expressions or code in a Display view:

display view

Example:

Example


See My favorite Eclipse view

  • To execute the code and display the returned value, push the button with a "J":
  • If you just want to execute some code that doesn't return a value, push the button with an arrow ">" and a "J":

The standard output will be printed to the Console view.

Farouche answered 6/1, 2010 at 15:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.