I have been trying to figure out how to display static variables in the eclipse variable window for the CDT and can't figure out how. The menu button for the CDT doesn't seem to have the java->globals menu. How do I display static/global variables in eclipse CDT debugger?
Variables/Expression view – Shows the declared variables and their values. Press Ctrl+Shift+d or Ctrl+Shift+i on a selected variable or expression to show its value. You can also add a permanent watch on an expression/variable that will then be shown in the Expressions view when debugging is on.
Variables. We can see the values of variables during the execution under the Variables view. In order to see the static variables, we can select the drop-down option Java -> Show Static Variables. Using the variables view, it's possible to change any value to the desired value during the execution.
In C, a global variable which doesn't have an initializer or any storage class specifiers is a tentative definition of a variable with static storage duration and external linkage.
Window -> Show View -> Expressions
You can add any expression there, so also global variables.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With