Hi all,
here is one of my long-running questions and my top issue where I'd love to see a future enhancement of the Lazarus/FPC ecosystem:
Is there a reasonably convenient and safe to use way to build my program and individual FCL and LCL libraries from Lazarus with the "debug" flag set, so next time I step through my code I can step into the source?
As far as I know, there are arcane ways to compile the whole LCL and FCL with debug. I have also found, by coincidence, that including a LCL or FCL source file in my project and recompiling the project set to "debug" configuration lets me step into that library. Recompiling Lazarus with debug is also rumoured to help. I am however not wuite sure which effects this has on my exercutable as well as other projects I do currentlyx have under development.
What I have already tried (On Windows, mostly)
- Do a second install of Lazarus (using FPUpDeluxe) with the debug flag set. My intention was to have two Lazarus'ses/FPCs with the same version number, one with debug, and one without, and load the source code in either one. For some reason this never worked like intended.
- I found unit object code in my user's directory, specifically in %appdata%\Lazarus, and it doesn't seem to distinguish between debug and no debug. Probably this "common" unit storage spoiled my "two installation" attempt
- I suspect that messing with two Lazarus Installations and libraries intransparently having been compiled with or without debug may pose a risk that debug information may inadvertadly remain linked in a program executable which does somehow make it into a shipped version.
What do you think? Did I miss somethig? Are there reasonable ways available giving me what I think is a very basic feature of an IDE: a quick way to include/exclude debugging information into all or part of an executable for debugging, but also a mechanism to guarantee that after some easy measure, say, after a "Build all" with debug turned off, the resulting executable is 100% debug free, but other projects under development are not affected in any way?
For hobbyist use what I found out so far about this topic this may suffice. I think I read through the Lazarus Wiki about debugging throughly, but this topic doesn't seem to be covered. For professional use I feel there needs to be a bit more. I am willing to contribute to the wiki, as soon as I have pulled together sufficient knowledge, but I need your guidance for that task.
Thnx, Armin.