[Lazarus] tooltip debugger shows incorrect data
Michael Van Canneyt
michael at freepascal.org
Wed Oct 13 16:14:25 CEST 2010
On Wed, 13 Oct 2010, Graeme Geldenhuys wrote:
> Op 2010-10-13 15:33, Michael Van Canneyt het geskryf:
>>>
>>> Ah, this might be the solution then. Thanks for that.
>>
>> You're welcome. Note that this uses
>> - dbugintf unit from FCL
>> - debugserver tool (lazarus/tools/debugserver)
>
>
> I did a few quick tests using various data types and even property values
> of a class instance - it indeed seems like the most reliable way to debug
> using FPC. :)
Not only FPC. I do the same in Delphi. Extremely useful for server
debugging.
I use the following code templates in Delphi and Lazarus :
send | Senddebug statement | Borland.EditOptions.Pascal]
{$ifdef debug}SendDebug('|');{$endif}
[sendf | Senddebug statement with format | Borland.EditOptions.Pascal]
{$ifdef debug}SendDebug(Format('|',[]));{$endif}
[sendu | Add dbugintf to uses in define | Borland.EditOptions.Pascal]
{$ifdef debug}dbugintf,{$endif}
[sendme | SendMethodEnter | Borland.EditOptions.Pascal]
{$ifdef debug}SendMethodEnter('|');{$endif}
[sendmx | SendmethodExit | Borland.EditOptions.Pascal]
{$ifdef debug}SendMethodExit('|');{$endif}
The $ifdef allows you to switch it on or off quite easily.
Michael.
More information about the Lazarus
mailing list