Please try with https://gitlab.com/freepascal.org/lazarus/lazarus/-/commit/47c34d2e7ea0356f0b101becc5df8cc311e8c4cd
You can copy and paste those changes into your current Lazarus. Definitely if you have 3.0, but 99% sure also if you have 2.2.x.
I failed big time. First I tried to paste the changes in my actual Lazaus and tried to rebuild the IDE. It immediately failed when reached fpdbglinuxclasses.pas, as it has in the uses FpDbgCpuX86 what was not in my files.
Ok, I should have been more precise. Copy the one method/function and replace the existing. Or even just the affected lines.
installed Lazarus 3.0RC1. It took me some time, but now I have it with FPC 3.2.2.
3.0.RC1 is old, 3.0 is already out.
But the change is currently in trunk (main branch) only.
So no release, and also not the 3-fixes branch
However, I found few things that are interesting to me.
In the new menu, under project options / compiler options / debugging there is a new checkbox "Run uses the debugger". I think this answers my earlier question why the debugger is relevant even if I do not compile with debugger information.
Enable/Disable debug info just means the debugger will be able to show variables and the current line. Or it will not, and you get only assembler.
Without debug info you can still run in the debugger.
Historically the "run (F9)" in the "run" menu, would always start the debugger (except if - in tools > options - you had no debugger backend configured at all. (Because then obviously it can't).
That meant, that if you had release and debug modes, your release mode, with F9 would still be started in the debugger.
Of course - historically - you could use "run without debugger" from the run menu, but that did not react to F9.
Now you can toggle what F9 should do.
Also, under project options / debugger there is a new option for debugger backend, next to gdb, fpdebug and ide default, called project debugger. I know nothing about this, so I google-ed: 'lazarus "use project debugger"' and got one result with a source code, but nothing else. Is there a documentation somewhere?
If you press F1 in that dialog, you should get to
https://wiki.freepascal.org/IDE_Window:_Project_Options_-_Debugger_BackendYou can configure additional backends in the project settings. This is useful if you use a remote debugger, that needs to be configured to connect to a specific other PC. But also if you need any other option of the debugger config to be different, just for the one project.