[fpc-devel] Conditional Breakpoints using FPC and GDB

Dimitri Smits smitco at telenet.be
Fri Aug 13 14:08:10 CEST 2010


----- "Graeme Geldenhuys" <graemeg.lists at gmail.com> schreef:

> On 13 August 2010 13:11, Michael Van Canneyt wrote:
> >
> > Can you explain this ? As far as I know, there no member of the core
> team
> > that objects to having properties inspectable in the debugger ?
> 
> I was obviously generalized a bit too much. If you really want me to,
> I can search the mailing list archive to find out who said what.
> Anyway, it was told many times before that inspecting a property with
> Getter and Setter methods may change underlying data - so the whole
> debugging of Properties are frowned upon.

btw, what I forgot to respond to in my last mail of a few mins ago:
a getter is not supposed to change anything, when working in a correct OO way.
a modifier/setter is the way to change data. The inspector can use both. Watches only getters.

So I fail to see the problem: when you CHANGE the value, it is because you explicitly did so through the inspector (ad-hoc expression evaluator should not allow this, just through inspector).

Those who frown upon that, need to reschool themselves in OO practices, because then they are using it incorrectly ;-)

Correcting/contradicting myself a little bit:
The reason that the checkbox in delphi watches is needed and the only thing that CAN change something in the internals of an object is when you have somesort of lazy-loading (be it from cache, db, ...) behind a getter. That is the reason why you need to explicitize to the developer who is supposed to know what (s)he is doing.

kind regards,
Dimitri Smits



More information about the fpc-devel mailing list