[Lazarus] debugger feature request created

Graeme Geldenhuys graemeg.lists at gmail.com
Mon Oct 5 09:30:42 CEST 2009


2009/10/4 Howard Page-Clark <hdpc at talktalk.net>:
>
> As well as the Watch window, are you aware of the excellent little
> debugserver application (separate executable) written by Michael?
> This lists messages from your application which you have inserted
> manually using methods of the dbugintf unit,

I remember hearing about this, but have never look at it or tried to
use it. Currently that is very similar to how I debug applications
using Lazarus. Simple writeln() statements. Actually what I do lately
is create a debugln() method with contains the writeln() code, but
that writeln code can be enabled or disabled with a compiler define.

eg:

procedure debugln(<array of params>);
begin
  {$ifdef debug}
   writeln(<array of params>);
  {$endif}
end;


So now I can disable debug output by simply removing the DEBUG define
from my project compiler options - no need to go delete the lines all
over my code (though I often do that anyway).

Also I created a keyboard shortcut (code template) in Lazarus IDE. I
simply type "d" and press Ctrl+J and it adds the following line in my
code:

   debugln(<current class.method name here>);

The class and method name is automatically inserted for me via the
code templates.

So far this is the most reliable debugging I have found (if I don't
use tiOPF which has it's own debugging framework and GUI viewer).



-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/




More information about the Lazarus mailing list