Eclipse Zone is brought to you in partnership with:

Erich is Professor at Lucerne University of Applied Sciences and Arts and Distinguished Member of Technical Staff at Freescale Semiconductor. Erich has a MsCS degree and 18+ years of experience in the embedded software and tools world. He created many embedded cross C/C++ compilers and debuggers. Additionally he is researching in the domain of programming languages, real time and mechatronic systems. Erich is a DZone MVB and is not an employee of DZone and has posted 119 posts at DZone. You can read more from them at their website. View Full User Profile

Hovering and Debugging

10.19.2012
| 4319 views |
  • submit to reddit

Eclipse provides in the Editor view great tool tips (called ‘hovers’) which shows what is behind a macro: I can move my mouse over it, and it shows me the content behind it:

Macro Expansion Hover in Editor View

Macro Expansion Hover in Editor View

But if I’m debugging, I get “No value available”:

'No value available' while debugging

‘No value available’ while debugging

Obviously, the debugger queries the value of that macro, and as there is no variable with that name, there is no value. Makes sense. But: how can I see the macro value while debugging?

The solution is to configure different hover keys in the preferences (menu Window > Preferences > C/C++ > Editor > Hovers):

Hover Preferences

Hover Preferences

The above dialog shows as well that there are different Hovers available. By default, the ‘Combined Hover’ is used. And it is using the Debugger Hover, which cannot provide a value, thus the ‘No value available’ result. The Hover Preferences has as well the possibility to assign a modifier key: with this, a selected hover can be used.

And indeed: if I use the ‘Shift’ key pressed while hovering in the debugger, I get what I want :-) :

Hover while Debugging with Shift key pressed

Hover while Debugging with Shift key pressed

Happy Hovering :-)

Published at DZone with permission of Erich Styger, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)