[Lazarus] How to make debugging ignore exceptions?

Bo Berglund bo.berglund at gmail.com
Sat Jun 24 00:14:42 CEST 2017


I need to make the Lazarus debugger ignore exceptions (not stop on
them), which is possible in Delphi (do not stop on language
exceptions).
How can I configure Lazarus to do the same?

I have a tight loop including reading an Indy TCP client socket
waiting for incoming data and I have put a try-except bracket around
this read. The problem is that the debugger always stops on the
exceptions making the debugging impossible (they happen with 10 ms
intervals).

Code snippet;

    //First check TCP data
    try
      FTcpComm.IOHandler.ReadBytes(Buf, BufLen, false);
      if Length(Buf) > 0 then
      begin
        SerWrite(FComH, Buf[0], Length(Buf));
        SetLength(Buf, 0);
      end;
    except
      //Do nothing on timeout, does not get here
    end;


-- 
Bo Berglund
Developer in Sweden



More information about the Lazarus mailing list