The gdb error is probably something else (afaik todo with gdb not codesigned on Mac, but I am not a Mac expert). If you have an up to date Mac, it is recommended to use "lldb + fpdebug" on Mac. (lldb comes with MacOs, and fpdebug is part of the IDE).
On Windows, the image with the breakpoint: red breakpoint with two yellow "bars" (like the pause symbol on a CD player). And also the absence of any blue dots. That means there was no debug info found for that code (probably the whole unit).
I have to double check, but I think if the unit had been found by the debugger, then the breakpoint would have gone orange with a cross "x" on it, to say that line had no debug info.
So the question now is why is there no debug info...
Is that unit part of a package? Or is it in your project?
=> If it is in a package, then open that package, and go to the options of that package, and enable "dwarf debug info" for that package.
=> If it is in your project, is it in the same folder than all the other sources in your project?
and at this moment i'm running Lazarus 3.0.
To be sure: From the official installer, with the version of FPC that came with it? Or build yourself with a different Fpc?
Does the code use generics?
Does the code use "type TFoo = object ..." ("object" instead of class or record)?
If none of the above helps
See the image on this page
https://wiki.lazarus.freepascal.org/Debugger_Setup#Project_Options- Are the highlighted options set (or "not set") in your project?
- On the pages "Custom options" (field "custom options") and "Additions and overrides" are there any settings?
And, if a package is involved, same questions for that package.
Also, if the settings are correct for such a package, from the package window, in the drop-down menu at the very right of the toolbar, chose "recompile clean".
And if still none of that helps: In the bin folder in the fpc directory is a objdump.exe
Run:
objdump.exe --info=dwarf yourproject.exe > log.txt
- Does it print any warnings ?
- if you search in the "log.txt" for the unit name of the unit that does not work, is that unit name found?
And if even then still none of that helps:
Is the project available public, or can it be shared privately?