Recent

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

ASerge

  • Hero Member
  • *****
  • Posts: 2214
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: 2514
    • 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 - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

grandehombre

  • New Member
  • *
  • Posts: 42
Re: Is there a Debugging Window on Lazarus?
« Reply #18 on: September 02, 2020, 12:18:03 am »
Unfortunately, that project (MultiLog) has a reference to an OutputChannel unit that does not exist  :-(
Lazarus v1.2RC2  i386-win32-win32/win64,  FPC v2.6.2, svn43696 on Win7-64 and win8.1

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Is there a Debugging Window on Lazarus?
« Reply #19 on: September 02, 2020, 12:58:58 am »
Unfortunately, that project (MultiLog) has a reference to an OutputChannel unit that does not exist  :-(
OPM version does not have that problem.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

 

TinyPortal © 2005-2018