Wrong VS2010 project settings when "Debugging enabled"

Discuss topics relating to the Introjucer (or Jucer) application

Wrong VS2010 project settings when "Debugging enabled"

Postby TheVinn » Thu May 03, 2012 7:02 pm

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_ !!!!

*sigh*
Open Source: LayerEffects, VFLib, SimpleDJ, DSP Filters, LuaBridge, JUCE, FreeType, TagLib
"This isn't a big project, it shouldn't take long." - Jules
User avatar
TheVinn
JUCE UberWeenie
 
Posts: 2976
Joined: Sat Aug 29, 2009 11:31 am
Location: Marina del Rey, California

Re: Wrong VS2010 project settings when "Debugging enabled"

Postby jules » Fri May 04, 2012 10:04 am

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..
User avatar
jules
Fearless Leader
 
Posts: 17229
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK

Re: Wrong VS2010 project settings when "Debugging enabled"

Postby TheVinn » Fri May 04, 2012 1:07 pm

jules wrote: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..


Then how do you build Release with debug info?
Open Source: LayerEffects, VFLib, SimpleDJ, DSP Filters, LuaBridge, JUCE, FreeType, TagLib
"This isn't a big project, it shouldn't take long." - Jules
User avatar
TheVinn
JUCE UberWeenie
 
Posts: 2976
Joined: Sat Aug 29, 2009 11:31 am
Location: Marina del Rey, California

Re: Wrong VS2010 project settings when "Debugging enabled"

Postby jules » Fri May 04, 2012 1:17 pm

That's not a very common thing to do! Why not create a new config, set it to debug mode, but turn on optimisation?
User avatar
jules
Fearless Leader
 
Posts: 17229
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK

Re: Wrong VS2010 project settings when "Debugging enabled"

Postby TheVinn » Fri May 04, 2012 1:25 pm

jules wrote:That's not a very common thing to do! Why not create a new config, set it to debug mode, but turn on optimisation?


1) Turning on "Debugging enabled" forces optimizations off regardless of what you have set for "Optimisation"
2) Turning on "Debugging enabled" uses the Multi-threaded Debug runtime library.
3) 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?
Open Source: LayerEffects, VFLib, SimpleDJ, DSP Filters, LuaBridge, JUCE, FreeType, TagLib
"This isn't a big project, it shouldn't take long." - Jules
User avatar
TheVinn
JUCE UberWeenie
 
Posts: 2976
Joined: Sat Aug 29, 2009 11:31 am
Location: Marina del Rey, California

Re: Wrong VS2010 project settings when "Debugging enabled"

Postby TheVinn » Wed May 30, 2012 10:45 pm

Bumping this because it never got fixed.

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.
Open Source: LayerEffects, VFLib, SimpleDJ, DSP Filters, LuaBridge, JUCE, FreeType, TagLib
"This isn't a big project, it shouldn't take long." - Jules
User avatar
TheVinn
JUCE UberWeenie
 
Posts: 2976
Joined: Sat Aug 29, 2009 11:31 am
Location: Marina del Rey, California

Re: Wrong VS2010 project settings when "Debugging enabled"

Postby jules » Thu May 31, 2012 9:41 am

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?
User avatar
jules
Fearless Leader
 
Posts: 17229
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK

Re: Wrong VS2010 project settings when "Debugging enabled"

Postby TheVinn » Thu May 31, 2012 1:48 pm

jules wrote:Any better ideas?


Sure, do exactly what you described with the two separate checkboxes, but call one "Generate symbols."
Open Source: LayerEffects, VFLib, SimpleDJ, DSP Filters, LuaBridge, JUCE, FreeType, TagLib
"This isn't a big project, it shouldn't take long." - Jules
User avatar
TheVinn
JUCE UberWeenie
 
Posts: 2976
Joined: Sat Aug 29, 2009 11:31 am
Location: Marina del Rey, California

Re: Wrong VS2010 project settings when "Debugging enabled"

Postby TheVinn » Tue Jul 03, 2012 4:59 pm

It would be nice to be able to profile optimized IntroJucer targets.
Open Source: LayerEffects, VFLib, SimpleDJ, DSP Filters, LuaBridge, JUCE, FreeType, TagLib
"This isn't a big project, it shouldn't take long." - Jules
User avatar
TheVinn
JUCE UberWeenie
 
Posts: 2976
Joined: Sat Aug 29, 2009 11:31 am
Location: Marina del Rey, California

Re: Wrong VS2010 project settings when "Debugging enabled"

Postby TheVinn » Thu Jul 12, 2012 5:15 pm

You could have these options in the exporter:

Dropdown "Debug mode"
"Debug"
"Release"
"Custom" <-- this will enable the following checkboxes:

If "Custom" is chosen then these checkbox become enabled:

(checkbox) "Debug build" (controls the NDEBUG macro, C runtime library)
(checkbox) "Generate symbols"
(checkbox) "Link Time Code Generation"
(dropdown) "Optimisation" (size/speed, maximum speed, none)
Open Source: LayerEffects, VFLib, SimpleDJ, DSP Filters, LuaBridge, JUCE, FreeType, TagLib
"This isn't a big project, it shouldn't take long." - Jules
User avatar
TheVinn
JUCE UberWeenie
 
Posts: 2976
Joined: Sat Aug 29, 2009 11:31 am
Location: Marina del Rey, California

Re: Wrong VS2010 project settings when "Debugging enabled"

Postby TheVinn » Fri Aug 10, 2012 4:13 pm

TheVinn wrote:It would be nice to be able to profile optimized IntroJucer targets.


I still can't use the project that Introjucer generates to create a profile, since it doesn't have debugging symbols turned on.
Open Source: LayerEffects, VFLib, SimpleDJ, DSP Filters, LuaBridge, JUCE, FreeType, TagLib
"This isn't a big project, it shouldn't take long." - Jules
User avatar
TheVinn
JUCE UberWeenie
 
Posts: 2976
Joined: Sat Aug 29, 2009 11:31 am
Location: Marina del Rey, California

Re: Wrong VS2010 project settings when "Debugging enabled"

Postby jules » Fri Aug 10, 2012 5:44 pm

I thought I added that after your last bout of nagging?
User avatar
jules
Fearless Leader
 
Posts: 17229
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK

Re: Wrong VS2010 project settings when "Debugging enabled"

Postby TheVinn » Fri Aug 10, 2012 5:48 pm

jules wrote:I thought I added that after your last bout of nagging?


Hmm...perhaps you set it for the C++ options but forgot to set "Generate Debug Info" in the Linker options?
Open Source: LayerEffects, VFLib, SimpleDJ, DSP Filters, LuaBridge, JUCE, FreeType, TagLib
"This isn't a big project, it shouldn't take long." - Jules
User avatar
TheVinn
JUCE UberWeenie
 
Posts: 2976
Joined: Sat Aug 29, 2009 11:31 am
Location: Marina del Rey, California

Re: Wrong VS2010 project settings when "Debugging enabled"

Postby TheVinn » Tue Jan 08, 2013 1:39 am

jules wrote:I thought I added that after your last bout of nagging?


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.
Open Source: LayerEffects, VFLib, SimpleDJ, DSP Filters, LuaBridge, JUCE, FreeType, TagLib
"This isn't a big project, it shouldn't take long." - Jules
User avatar
TheVinn
JUCE UberWeenie
 
Posts: 2976
Joined: Sat Aug 29, 2009 11:31 am
Location: Marina del Rey, California

Re: Wrong VS2010 project settings when "Debugging enabled"

Postby TheVinn » Tue Jan 08, 2013 3:19 pm

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.
Open Source: LayerEffects, VFLib, SimpleDJ, DSP Filters, LuaBridge, JUCE, FreeType, TagLib
"This isn't a big project, it shouldn't take long." - Jules
User avatar
TheVinn
JUCE UberWeenie
 
Posts: 2976
Joined: Sat Aug 29, 2009 11:31 am
Location: Marina del Rey, California

Next

Return to The Introjucer/Jucer

Who is online

Users browsing this forum: Google [Bot] and 2 guests