Lots of questions....
You mention "gdb". Do you use the gdb based, or the lldb based debugger?
(I know the IDE dialog also still refers to gdb, even so some applies to lldb too)
"Generate debug info for gdb" must be ticked for lldb too.
Debug info type: "Dwarf (with sets)" should be fine.
With "lldb (with fbdebug) you may get good results with "dwarf 3" too.
You may want to try "external debug info" versus not using it.
If you have used it, then remove the folder projectname.dSYM (or the debugger keeps looking at the old folder / even though it would/should ignore it *after* reading all of it)
I base the rest of my reply on the assumption that you use lldb+fpdebug.
Please read
https://forum.lazarus.freepascal.org/index.php/topic,44967.0.htmlYou may want to upgrade to 2.0. Or better fixes branch. There are some issues fixed.
You may also follow
https://forum.lazarus.freepascal.org/index.php?topic=44950.new#newThis is also an issue during starting the project. Though you do not get the crash. And the nil pointer deref should always cause it.
Speed:
Go through the packages used. Any package you do not debug, disable debug info. Less for the debugger to read. (You can do that via "Additions and overrides" / see wiki)
It may not make a big diff though.
Also ensure there is no outdate *.dSYM folder.
Optimization 1 vs 0
0 is better. (for debugging)
1 can affect watches. In rare cases watch values may not be updated on each step, if 1 is used for optimization.
0 or 1 should not affect the startup
There is a package "LazDebuggerLldb" without any "fp" in it. You can install it for testing pure lldb debugging.
Be warned: all watches will be displayed c-style.
And they must be inputed c-style too "form1->Ffield".
But in case the issue if with the "fpdebug" part, this would be a workaround.
See the first link above.
It has details how to provide a logfile.
You specified 64bit.
That applies to both:
- your IDE (Lazarus build 64bit, rather than cross-debugging)
- your own app
?