properties currently don't work in the debugger. Well, except in some case, when the have "read FSomeField" (not go through a getter method).
Reasons for that are part historical....
As desirable is it may be, it will likely still take some time. It needs to be coordinated with the compiler development.
At the moment you may (50/50 chance) be able to do
GetItemIndex()
Or whatever the name of the getter is.
It needs "function calls" enabled, in the global options AND in the watch properties.
It doesn't currently work for all getters. (It likely works if they are virtual, and in very few other cases)
Warning:
Calling function from watches (or eval/modify) can have side effects.
That is true for all debuggers (i.e. that also happens in Delphi, and I have personally been badly burnt by that). And that is true for evaluating any property that has a getter function.
If the called function modifies any variable/field in the app, then the app will behave according to that modification.
Example:
- The property "Handle" (or is it a function?) does create a handle if it hasn't yet been created (and if possible).
- I had code, that crashed, because it accessed handle without that function (and handle was not created).
- During debugging I wanted to know the value of handle, and forgot the property would create it, so I added "Handle" as watch (that was Delphi)
- The app did not fail during debugging, I was for some time not able to find the bug.
So once that properties have been added as feature, use with caution.