* * *

Author Topic: Is there a Debugging Window on Lazarus?  (Read 7116 times)

ASerge

  • Sr. Member
  • ****
  • Posts: 431
Re: Is there a Debugging Window on Lazarus?
« Reply #15 on: August 13, 2017, 11:14:48 am »
View/Debug Windows/Event Log (Ctrl+Alt+V)
Code: Pascal  [Select]
  1. uses Windows;
  2.  
  3. procedure DebugLn(const Text: string); overload;
  4. var
  5.   Data: UnicodeString;
  6. begin
  7.   Data := UTF8Decode(Text);
  8.   OutputDebugStringW(PWideChar(Data));
  9. end;
  10.  
  11. procedure DebugLn(const FmtText: string; const Params: array of const); overload;
  12. begin
  13.   DebugLn(Format(FmtText, Params));
  14. end;
  15.  
  16. procedure TForm1.FormCreate(Sender: TObject);
  17. begin
  18.   DebugLn('One');
  19.   DebugLn('DebugLn addr: %p', [@DebugLn]);
  20. end;

GeertVc

  • Newbie
  • Posts: 3
Re: Is there a Debugging Window on Lazarus?
« Reply #16 on: August 13, 2017, 11:57:59 am »
Well, what can I say.  Newbie, I am...  :-[

PS: I had to include sysutils too to get it working (provides "Format").

avra

  • Hero Member
  • *****
  • Posts: 1125
    • Additional info
Re: Is there a Debugging Window on Lazarus?
« Reply #17 on: August 13, 2017, 12:18:39 pm »
However, it's anyhow a pitty that WriteLn() doesn't work with Windows GUI's
You might want to take a look at MultiLog: http://wiki.lazarus.freepascal.org/MultiLog
ct2laz - Easily convert components and projects between Lazarus and CodeTyphon

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus