Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see static or global variables in Eclipse CDT?

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?

like image 823
themaestro Avatar asked Dec 13 '10 22:12

themaestro


People also ask

How do I view variables in Eclipse?

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.

How do I show static variables in Eclipse debugger?

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.

Are global variables in C static?

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.


1 Answers

Window -> Show View -> Expressions

You can add any expression there, so also global variables.

like image 52
Kos Avatar answered Oct 29 '22 20:10

Kos