The current Eclipse Kepler version comes with changes for debugging variables. I have students coming from the earlier Eclipse versions, so here are a few tips for dealing with variables in Eclipse Kepler.
The variable hover in Kepler now shows the variables in different formats. Most of the time, I get all the information needed:
The hover functionality already shows most of the time the information I need. If I need more, then I can use the Variables view.
A cool feature is that I can select multiple variables (with CTRL key pressed), and it will show in the details pane the different content. Remember my post about “Eclipse Debugging with Strings“? This works now as expected in Kepler too :-).
Changing the Number Format
The ability to change the number format (hex, decimal, octal, binary, string) is hidden behind the small triangle of the view:
There is one big downside using Kepler with GDB: adding global variables to the variables view is not supported 😦
Eclipse moved to the DSF (Debugger Services Framework), and adding global variables to the Variables view is not supported (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=219040). The workaround is to use the Expressions view:
The global variables can be displayed as expressions:
💡 Instead typing the expression, I can drag&drop variables from the Source view to the Expressions view.
Eclipse Kepler comes with changes how it deals with variable debugging. The good news is that things are more versatile and powerful (e.g. string debugging finally works). Only global variable debugging is very different: the Expressions view needs to be used for this. But after a while, it is not a bad solution anyway.
Happy Variabling 🙂