Impractically slow debugger lazarus / 12-Debugger ---------------------------------------------------------------------- hakelm · 2021-11-19 15:06 Recently my Lazarus debugger (GDB) has become very slow even when there are no breakpoints, so slow that it is impractical to use. What can I look for or do? I am using Lazarus 2.0.11 and GDB 7.11.1 under Ubuntu 16.04 ---------------------------------------------------------------------- af0815 · 2021-11-19 15:16 try to us a newer Lazarus and fpDebug. See https://wiki.freepascal.org/FpDebug ---------------------------------------------------------------------- hakelm · 2021-11-19 16:00 Thanks, the fpdebugger did the trick. But was has happened to the GDB? H ---------------------------------------------------------------------- ccrause · 2021-11-19 16:32 Quote from: hakelm on November 19, 2021, 05:00:13 pmBut was has happened to the GDB? Not sure why you experienced a sudden slowdown using gdb.  I have also experienced it occasionally on Linux Mint. I can further vouch that fpdebug is generally quicker than gdb, especially when debugging Lazarus itself.  This is at least partially due to fpdebug being compiled into Lazarus and not called as an external program (in my opinion). ---------------------------------------------------------------------- JuhaManninen · 2021-11-19 16:40 Yes. +1 The GDB experience always depended on its version, other libs involved, the OS, IPC etc. I am happy that FpDebug is usable now. It is already faster and it will get better over time. Eventually it will support property getter methods when FPC adds support for it. I understood FpDebug does not work on every platform yet. Where it works it is the nro 1. choice now. ---------------------------------------------------------------------- Martin_fr · 2021-11-19 17:05 To try and find out why it got slower, more info is needed. Is that for all projects? Including "hello world" style sample projects? First of all, I have to be sure if there  was an update to the gdb you are using? Or any other changes, you are aware off? - Did it get slower when you update Lazarus? (Can you get the faster experience with the old Lazarus)? - Did this include a change in fpc version - Did you change "project options" => stabs, dwarf-2, dwarf-3, ..... - Did you recompile packages (or fpc rtl) with debug info (so there is now more debug info)? Is this just stepping, or other things too? Does it help if you do *ALL* of the below: - IMPORTANT: Open the history window, and use the power button to switch it off) - clear the watches (or use the power button to switch it off) - close locals window - close the stack window The issue with using GDB has always been: speed vs correctness. To evaluate a watch, so that a meaningful result is displayed (and pascal input is understood) the debugger must sent lots of commands to gdb, that takes time. There were a few updates to stepping, but nothing to major that I could remember. E.g. Stepping F7/F8 over exceptions (when the debugger does not stop for the exception) would not pause at the end of the step, but just keep running. This was fixed, it does sent some extra commands to gdb, but in my tests was not noticeable slowing it down. Not sure how far back that was added, but its not been that recent.