7

Is there any way to make Eclipse show the variables content, when debugging, inside the editor, without having to inspect them or look in the variables view?

The image below shows IntelliJ's debugger. I am looking for something similar in eclipse, a plugin maybe.

enter image description here

tzortzik
  • 4,993
  • 9
  • 57
  • 88

2 Answers2

1

There is no way in eclipse to see the variables current value inside the editor. You need to use the Eclipse inspection (Ctrl + Shift + I) or the Variables View.

See some limitations: Things possible in IntelliJ that aren't possible in Eclipse?

Community
  • 1
  • 1
Sumit Singh
  • 15,743
  • 6
  • 59
  • 89
1

Check if Eclipse 4.23 (Feb. 2022, 7 years later) could help:

Debuggers can show values inline

The Run/Debug preference page now shows a new option to allow to show debug values inline.

When enabled, this will print debug values as a code minings annotation on the end of line.
The values shown would then react to change in the debug context as you navigate through the execution.

This is an experimental feature and as this requires extra effort for the debuggers to enable it, not all debuggers may support it yet.

https://www.eclipse.org/eclipse/news/4.23/images/debug-value-inline.png

To be activated with the preference:

https://www.eclipse.org/eclipse/news/4.23/images/debug-preference-inline.png


As noted by gillesB in the comments in 2022:

It is worth to mention that the Java debugger does not yet support this feature.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250