Ok, I got a follow-up problem.
From your answers to my previous question about how to debug libraries I learned that, unfortunately, Lazarus does not have a way to turn on/off debugging (incl. optimization settings) for all libraries and packages contributing to the final .exe.
Since I needed to debug into the FCL, I started to use a secondary Lazarus install (via fpcupdeluxe), compiled with -g -gw2 -O-, and it seems to do the trick when it comes to debugging - I can now step into FCL calls and I finally got my problem resolved with ease. Great, and another example that "Open Source" is a great if not indispensable aid for debugging.
The downside ist, however, that the build chain is now somewhat broken, if I switch between two Lazarus installations. Is it guaranteed and checked that, when I finally do a "Clean up and build" using the non-debug Lazarus installation in "Release" mode, absolutely no debug information is contained in the final exe, neither in my software, any included unit, the LCL, the FCL or any other package involved?
It contributes to my suspicion, that the final exe I have after a build differs only 5% in size between a debug and a release build (635 vs. 599KB)
Besides of LCL and FCL, I am also suspicious regarding packages downloaded by OPM. As far as I have seen, all packages are downloaded and compiled into one single directory (Windows: my user %APPDATA%\Local\Lazarus directory), there seems to be no separation of packages compiled with different Lazarus installations, and there seems to be no file structure distinguishing between a debug and a release build of a library.
Can I trust the Lazarus build process that it can handle this, and how can I check (just to be sure)?
Thnks again, Armin.