Search code examples
eclipse-cdt

Eclipse not showing all variables in viewer during debug mode


Short question, why is it that the variables that are declared in my header file don't show up in the Variables window during debug mode? Only when I move the declaration from the header file to the source file do I have the option of viewing them within this viewer.

Can someone tell me if there's also a way to view the other variables?


Solution

  • Use the Expressions view to view non-local variables. Open the view (Window menu -> Show View -> Expressions) and add the variables of interest. There are some context menu items if you select a variable or expression (with associated short-cut keys).