[Lazarus] Readig dbg files
Bogusław Brandys
brandys at o2.pl
Tue Jul 20 20:21:23 CEST 2010
On Tue, 20 Jul 2010, Bernd wrote:
> 2010/7/20 Mattias Gaertner <nc-gaertnma at netcologne.de>:
>
>>> So please enlighten me. What are the benefits of such a debug monitor? Perhaps I am missing something.
>
>
> It would just be nice to have this all somehow unified and more
> *comfortably* usable in Lazarus. On windows I almost exclusively use
> OutputDebugString() for everything that is (or runs inside) a GUI app
> and has no stdout available (basically everything in windows). Only
> the Lazarus/GDB combination will not easily allow this and this is
> because GDB originates from the *ix world and there no such API exists
> and working from the command line and with log files is a hundred
> times easier with all the available tools and much more the norm than
> in windows.
I suggest you look at the debugserver tool and the dbugintf units in FPC.
SendDebug('Some message');
SendDebugFmt('variable A : %s',[A]);
Program flow is easily monitored with
SendMethodEnter('Entering MyMethod');
SendmethodExit('Exiting mymethod');
It nicely indents/de-indents the messages in the output.
It works as you describe it, does not interfere with the debugger
at all and is cross-platform to boot. I use it since 12 years,
also in Delphi, where it is part of gexperts.
I couldn't develop without it.
Michael.
More information about the Lazarus
mailing list