Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strange "inaccessible value" in debugger

Could anyone explain this screen:

enter image description here

As you can see I have simple array - debugger shows values of its elements when I use A[0], A1... but I cannot get elements with local variable A[i] (but value of "i" is shown correctly).

Project settings:
Debug info: ON
Local Symbols: ON
Optimization: OFF.

Project (one PAS file) is BUILD so DCU is fresh. You can see on that screen almost full code of this test project so there is no chance that array A or "i" is declared in some other unit etc...

Now I checked - the same code in Delphi XE3 works perfectly - debugger shows all values. It seems that XE4 has a serious bug in basic feature :-((

like image 948
rafal chlopek Avatar asked May 29 '13 05:05

rafal chlopek


2 Answers

It doesn't work because 'val' is a function and not a variable. Double click on the watched item and check the property 'allow function calls'.

like image 181
Delphi Cheese Avatar answered Nov 15 '22 20:11

Delphi Cheese


i is a var and this var need an amount for instance change i to 1 and check it;

A[1].val;
like image 44
Alireza Abolhasani Avatar answered Nov 15 '22 20:11

Alireza Abolhasani