Couldn't it be possible to include some entries into the debug RTL as debug proxies for TypInfo.GetProp/SetProp and the IDE to use them to call the live getters/setters?
It is being worked on. Well something similar.
- The "function" (that is the getter "GetItemIndex") is already in the debugged app.
- The debugger (FpDebug) already has the ability to call functions like this.
But, there are 2 things missing:
When the debugger looks at a term like "MyRadioGroup.ItemIndex", the debugger knows that "MyRadioGroup" is a "TRadioGroup".
1) The debugger must then have a mapping from "TRadioGroup.ItemIndex" to "TRadioGroup.
GetItemIndex".
2) The debugger must be able to know the address of "TRadioGroup.GetItemIndex" (and the data-type expected back)
Both are missing, and being worked on.
If you add a method to your "TForm1"
function TForm1.GetThatItemIndex: Integer;
begin
result := MyRadioGroup.ItemIndex;
end;
Then you should be able to watch "Form1.GetThatItemIndex()"
(At least while paused at any code in the same unit // And of course assuming you twice enabled function-calling: globally
and for the watch in question)
In Lazarus 2.2.x the result of the function must be on ordinal (integer, cardinal, byte, (afaik also) enum).
In Lazarus 2.3 the function result can also be a string,
if all debug info is dwarf-
3Especially on Linux that means, it is
not allowed to have an RTL compiled with just dwarf-2 => it can be without any dwarf (as is default), or with dwarf-3).