First, many thanks for the work put in to making and maintaining these things. I am an old programmer trying not to learn (too many) new tricks. I grew up coding C, but took a chance on Pascal at one point and found it comfortable. Borland came out with Delphi and I was hooked. That was a long time ago.
Recently I found a need to do some coding; more hobby than work. The world has changed so I knew that I was facing a learning curve so I looked around and figured, I would take on Swift. I liked the language constructs, but quickly fell out of love with integrating the user interface with the code. Out of curiosity, I wondered what ever happened to Delphi.
I was surprised to find Lazarus and FPC. Amazing! In minutes, I had a Delphi like IDE attached to a pascal compiler that felt comfortable to me. Although, over the span of a couple of weeks, I have still yet to get the debugger to work.
First it was the error suggesting that GDB was not code signed. The instructions for doing that are everywhere and they are consistent so I was confident that I had that completed. Nonetheless, I varied the approach slightly and tried it dozens of times. Found one post that said he could run DBG in a terminal as root, but not as his user ID. My case was similar, but ultimately that possibility died when I resolved running in a terminal only to find that this was not going to solve it for running in Lazarus.
I did make progress when I read that the SIT had to be set up for debugging to be an exception. Went down that path and, while I still get the occasional error popups, the one suggesting that GDB needs to be code signed have disappeared.
Now what is happening is that when I click the "play" button, the code is compiled and the title bar changes to indicate that it is "debugging", but nothing happens. The window does not run and no code appears to be executing. I can see DBG has a thread in the process status (started as "/usr/local/bin/gdb -silent -i mi -nx"), but no action. The test code is simply a window with a single button that has the command "close" tied to the click event. If I run the program without invoking the debugger it works as expected.
What I am hoping someone can tell me is whether the GDB integration with Lazarus/FPC actually works or am I chasing unicorns and should go back and do the work to get comfortable with Swift.
A quick run down on what I have done so far...
I ensured that xcode and the associated command line tools are up-to-date.
I used brew to install GDB version. That is version 8.2. I have since tried where some recommend falling back to 8.0.1.
I have signed the GDB using a system certificate that I created following the many example for this that are posted. I have verified the signing numerous times (and re-performed that step anyway)
After installing GDB, I have installed FPC, FPC Source and Lasarus (in that order)
I have tried Lazarus v 1.84 and v2 RC1 with the associated FPC and source.
I have performed all of this on two different machines, one running High Sierra and the other Majove.
Again, kudos to the developers for Lazarus and FPC... those worked flawlessly every combination, every time. I am sure DBG by itself is a wonderful tool also... but I am beginning to suspect that the integration between the two has fallen through the cracks.
Thanks again in advance for any wisdom that can be shared on this topic.