debugln('foo');

from LCLProc may be your friend. It, is used in lazarus itself, too.

it does first look for a param "'--debug-log='", then enviroment, then 
<STDOUT>.
And it just keeps silent, if no output at all is avail.

For more info go to the LCLProc unit and check the initialization 
section at the end of file.


Regards
Martin


Felipe Monteiro de Carvalho wrote:
> The usual solution for this is doing like this:
>
> {$ifdef Debug}
>   {$apptype console}
> {$endif}
>
> {$ifdef Debug}
>   WriteLn(....);
> {$endif}
>
> If you want to see the writelns you build with Debug defined.
>
>   
_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to