tzortzik
tzortzik

Reputation: 5143

Eclipse debug show variables content

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

Upvotes: 7

Views: 1676

Answers (2)

VonC
VonC

Reputation: 1329622

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.

Upvotes: 2

Sumit Singh
Sumit Singh

Reputation: 15906

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?

Upvotes: 1

Related Questions