Saving the "Strip all debug symbols from executable" lazarus / 65-FV-Textmode IDE ---------------------------------------------------------------------- spigor · 2025-06-27 04:05 Hi I'm using the FPC 3.2.2. Is there a way to turn on the Options->Debugger->"Strip all debug symbols from executable" option permanently? I'm saving the setup in fp.ini, but this option is no longer on after reloading the FPC. Thank you in advance for your input. ---------------------------------------------------------------------- jamie · 2025-06-27 23:11 You are talking about the -Xs ? ---------------------------------------------------------------------- Martin_fr · 2025-06-27 23:49 Doesn't the "Set compiler options as default" checkbox work for that? In the lower left corner of the "Project Options" dialog (above the help button). ---------------------------------------------------------------------- MarkMLl · 2025-06-28 07:00 Quote from: spigor on June 27, 2025, 06:05:02 amI'm using the FPC 3.2.2. Is there a way to turn on the Options->Debugger->"Strip all debug symbols from executable" option permanently? I'm saving the setup in fp.ini, but this option is no longer on after reloading the FPC. FPC is a compiler, it has a command line rather than menus. What else are you running, what's its version number etc.? Assuming for a moment (as does Martin) that you're running Lazarus. fp.ini isn't relevant here since that's for the FP character-mode editor/etc. which is intended to be roughly comparable with Turbo Pascal and is read neither by the FPC compiler nor by Lazarus. You should find an fpc.cfg file somewhere which will usually be used, but generally speaking that's best not fooled with and the storage location will vary depending on the OS etc. you're using (which you've not told us). MarkMLl ---------------------------------------------------------------------- MarkMLl · 2025-06-28 07:49 Quote from: Martin_fr on June 28, 2025, 01:49:53 amDoesn't the "Set compiler options as default" checkbox work for that? In the lower left corner of the "Project Options" dialog (above the help button). Assuming that OP is, in fact, using Lazarus. That will set the defaults for subsequently-created projects, although there are some fields- notably those that usually contain macros- which aren't handled properly (unless that's something that's been fixed recently). MarkMLl ---------------------------------------------------------------------- Martin_fr · 2025-06-28 08:32 Oh, ouch. I missed that this went into the "Free Pascal" subforum. Then it likely isn't Lazarus. Possible even the FP console IDE. My bad. And no idea how. ---------------------------------------------------------------------- n7800 · 2025-06-29 06:09 By the way, there is a separate board for the console IDE ("fp.exe"). However, the author specified the path to the option for the Lazarus, and apparently he means Lazarus? Quote from: spigor on June 27, 2025, 06:05:02 amIs there a way to turn on the Options->Debugger->"Strip all debug symbols from executable" option permanently? ---------------------------------------------------------------------- n7800 · 2025-06-29 06:12 Quote from: MarkMLl on June 28, 2025, 09:49:34 amQuote from: Martin_fr on June 28, 2025, 01:49:53 amDoesn't the "Set compiler options as default" checkbox work for that? In the lower left corner of the "Project Options" dialog (above the help button). That will set the defaults for subsequently-created projects, although there are some fields- notably those that usually contain macros- which aren't handled properly (unless that's something that's been fixed recently). I also don't recommend using this setup now, as it has issues with project types (see issue #38106). ---------------------------------------------------------------------- spigor · 2025-06-29 11:38 Thanks for your input! I was referring to the Free Pascal IDE (fp.exe). I will find that IDE forum and post there. EDIT: I have only found a textmode IDE forum for FP, it looks like this thread belongs here. ---------------------------------------------------------------------- spigor · 2025-07-02 03:19 The original question has evolved into: In the FP's Textmode IDE, there is a setting in Options->Debugger->"Strip all debug symbols from executable" which gets reset at program restart. This setting is not saved with the other options, at least in my case. Would that be intentional, or it's just a bug? ---------------------------------------------------------------------- mika · 2025-07-02 08:35 Options->Environment->Preferences  Auto save environment. You can save manually as well. ---------------------------------------------------------------------- Thaddy · 2025-07-02 11:05 There is also another option: you can store the debug info in a separate file (-Xg option, which is my default) This does not strip, but can still minimize the executable size considerably.