[Lazarus] Debugging on macOS

Martin Frb lazarus at mfriebe.de
Sun Mar 10 23:05:05 CET 2019

Just an update

On 09/03/2019 19:57, Martin Frb via lazarus wrote:
> Startup is known to take some time. Both the IDE, and lldb need to 
> parse the debug info, and both take some time to do so. (both running 
> in parallel threads for this).
> To speed up, make sure that you disable debug info for any package, 
> you do not need to step into.
I made some changes to trunk. As a side-effect the debugger may start a 
bit faster. But I would expect it to be a very small improvement, if any 
at all.

You may get a warning at start, in certain cases. See the forum post.
The warning can be disabled in the ide menu: Tools > Options under debugger.

> In case of hangs while stepping,
> When you press step, the debugger will (should?) abort reading locals 
> and watches. But it will only do so between 2 watches.
> If a single watch takes a lot of time, this may add delays.

To clarify:
The "hangs" during single stepping. Which of the 2 describes the issue:

1) When the debugger is paused (from after the last step), and you press 
F7/F8 the debugger does not react immediately.
The app remains paused (the green arrow in the gutter, is still 
visible), and only after some time, the step is started (the green arrow 
disappears, and then re-appears on the next line)

2) The step starts immediately (the green arrow disappears). But it 
takes a long time until the app stops at the next line.
(and the line you step over, is not calling some time consuming function 
/ the line is not a single line loop, that will loop for a long time)

For 1:
It appears I was wrong. Watch/Locals evaluation is not currently 
interrupted. So this may cause long delays.
I will be looking into this.

For 2:
Not sure.
If you step over a function, and there are exceptions raised (and to be 
ignored by the debugger) then it takes the IDE some extra work to get 
back to the calling function.
But this should not take than long.

More information about the lazarus mailing list