[Lazarus] Impossible to debug with Lazarus IDE

Vincent Snijders vsnijders at vodafonevast.nl
Fri Oct 31 10:16:21 CET 2008


Graeme Geldenhuys schreef:
> On Fri, Oct 31, 2008 at 10:19 AM, Martin Schreiber <fpmse at bluewin.ch> wrote:
>> Correct. MSEide can not access property values. Fortunately prepending the
>> property name with 'F' usual works because of the naming convention.
> 
> That was a handy trick. I managed to debug my program in Lazarus IDE
> yesterday, using that method. Thanks.
> 
>> Calling a property getter function is dangerous because the function often
>> does more than simply return the value.
> 
> I do not think that matters much. Properties are a fundamental
> language feature in Object Pascal and are used often, so the debugger
> must support it. Plus the code you are debugging doesn't care what's
> happing in the Getter method, it is only concerned with the result
> returned. So if the result return is not what you expected in that
> code location, then debug the Getter method or step into the Getter
> method. This worked for Delphi and Kylix from the start.

Well, it can become tricky. Suppose you try to debug something in the 
form creating and initial showing. If you inspect the MyForm.Handle, the 
handle gets created. Now, the handle is created at another point in the 
initialization sequence than at normal run time.

Vincent



More information about the Lazarus mailing list