When “Debugging enabled” is checked for a Release build, the only setting that should be changed is the “Generate debug info” option in Visual Studio. Perhaps we should change the IntroJucer label to “Generate debug info.”
As it stands, there is no way using IntroJucer to generate debug info for a Release build. Checking “Debugging enabled” in a Release target defines the macros DEBUG and DEBUG_ !!!
If that wasn’t the case, then to create a normal debug config, people need to set a _DEBUG macro manually, and it’s not realistic to just expect people to somehow know that they have to do that…
Turning on “Debugging enabled” forces optimizations off regardless of what you have set for “Optimisation”
Turning on “Debugging enabled” uses the Multi-threaded Debug runtime library.
Turning on “Debugging enabled” sets the DEBUG and DEBUG_ macros.
I don’t want any of these things…I simply need a Release build that generates a .pdb file! Its hard to imagine that this is not a common use-case. Who on earth sends a Debug build to the testing department? A Debug version is like a completely different app…different runtime library, different behavior (because of DEBUG macro), and different run time performance characteristics.
Besides, are you saying that IntroJucer only supports “common” use cases and that anyone else is SOL?
It is VITAL to be able to produce release builds (full optimization, with LTCG link time code generation OPTIONAL) that have debugging information / symbols / .pdb files.
Profilers need symbols to generate a report, and profiling a Debug version is…well, kinda pointless.
I can’t see how this could be done without each config having two different debug switches, the normal one which selects all the appropriate macros and libraries, and another switch that only affects the flag to generate the pdb… That seems like it’d be very confusing to me. Any better ideas?
This is still a problem. How can I make this clear…we need to be able to Generate Debug Info in Release builds. That is to say, that there needs to be a way to tell IntroJucer “I want my Release builds to be optimized, with all the settings as they are currently, except that I want to also generate debug symbols in the executable and also produce a .pdb file.”
Right now if I check “Debugging enabled” then technically, yes it allows debugging but it also sets the DEBUG and DEBUG_ macros which makes the app run very slow and is useless for profiling. I had “isPositiveAndBelow” showing up in my profiles along with all the other code that is called in jasserts.
There is no convenient way to profile a Release target generated in IntroJucer.
When I build an installer for pre-release versions of my software I always include the .pdb file and build the executables with symbols so that if there’s a crash I can get a decent stack. It is not possible to do this with IntroJucer.
A checkbox for “Generate debugging symbols” would do it. I would turn “Debugging enabled” off for Release targets, and check the box for “Generate debugging symbols.”
Fixed this myself in the Introjucer because I’m tired of messing with a dickered VS project. Here’s the code to an easy way out, that doesn’t care about the other MSVC based exporters:
Added the following in jucer_PresetIDs:
DECLARE_ID (generateDebugSymbols);
Added the following in the class MSVCBuildConfiguration: