Setting -g in the options and rebuilding the IDE
Actually -g is (on most systems) equal to -gs
I wrote -g- (trailing -)
But it does not matter "Override and Additions" take care of it.
Does setting -gw in the overrides and additions override the IDE settings, or just the local project?
http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Additions_and_OverridesIt affects the project.
HOWEVER:
- it rebuilds all packages by the project (unless you specify "Tagets")
This is in that case what you need. A single package not on -gw (Actually -g- would be fine / but one package on -g or -gs and your gdb crashes)
If you build another project it will again build all of them. (exception see below)
So it takes longer, if you switch projects and build.
- You can also set the global ide conf to -gw
- you can change the output dir for packages so they do not replace the default build (Yet the default build does not work for you)
HOWEVER (part 2) [and above mentioned exception]
- if you add the build mode under "Stored in IDE" and tick the build-mode "default"
then it is set for all projects (except projects on a different build-mode.
I actually recommend to do that.
Then add a release build mode to your projects, (If you use the automatic creation of "debug and release mode" then also tick the "debug" mode afterwards.
The release mode stays unticked, and will not be affected.