DebugLn

From Lazarus wiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

DebugLn is a LazLogger procedure that can assist debugging.

In your main program use code like:

program main;
uses
{$ifdef DEBUG}
  LazLogger;
{$end}

...

end.

In units where you need debugln-style debugging:

uses
{$ifdef DEBUG}
  LazLoggerBase;
{$else}
  LazLoggerDummy;
{$end}

procedure dosomething();
var
  s: string;
begin
...
  debugln( s );
...
end;

Syntax of debugln is comparable to writeln syntax.