Search code examples
c++eclipsegdbeclipse-cdt

Debugging C++ code with Eclipse, the view Variables is empty and no tooltip showing variable value


I am writing some C++ code in Eclipse + CDT under Ubuntu 15.10. When I debug, the view "Variables" contains only "std::__ioinit" and no other value appears as variables are created. Furthermore when I stop the mouse over a variable the tooltip doesn't show the variable value, but only the part of code where I declare the variable. Do you know how to actually have it display variables?

I'm using Eclipse 3.8.1, with CDT 8.0.2 and GDB 7.4.

Note: If I launch gdb from the shell it says that gdb version is

GNU gdb (Ubuntu/Linaro 7.4-2012.02-0ubuntu2) 7.4-2012.02

But if I go to Help -> About Eclipse platform -> CDT button I have this information:

enter image description here

Thanks!


Solution

  • I solved upgrading the version of Eclipse. Apparently on Ubuntu's repos there is an old version. I downloaded the last version and installed it, like shown here:

    http://ubuntuhandbook.org/index.php/2016/01/how-to-install-the-latest-eclipse-in-ubuntu-16-04-15-10/

    now variables appear.