When using the debugger in VAJ3 sometimes certain variables are not visible. Why?
Created May 4, 2012
Anthony J. Muc
Also, if you edit any code in the debugger, it will not display any variables until you have saved the changes.
This is a symptom of an optimization the VAJ compiler is doing. If you define a variable which is not referenced, the compiler will optimize it away (remove it) as if you never included it. Even assigning a value to the variable is not enough to keep it around. For example:
int i; ... i = 1; ... the rest of the method, with no reference to i ...This will result in the value of i not being visible in the debugger.
During run-time in the debugger, holding the mouse over i will not show anything because i is not used in the program.