Sign in to follow this  
Headkaze

Debug output options for Visual Studio using Release

Recommended Posts

Headkaze    607

I have a project I'm working on that has folders relative to the "Release" folder that my application requires. This means I am constantly compiling in Release mode even during debugging.

 

The issue is I want to be able to toggle debug output on and off.

 

What should I do to deal with this situation? Should I set the Debug and Release output folders the same directory and use Debug when I want Debug output? Or should I use the Release mode and setup a #define for toggling Debug output?

Share this post


Link to post
Share on other sites
SeanMiddleditch    17565
A common approach is to make a common output directory and then modify the output names for release vs debug names. For instance, you might generate Foo.exe and FooDebug.exe. DLLs/libraries often have a 'd' suffix on debug builds as well.

Another very common approach is to just not make things relevant to the output directories. You can use a post-build step to copy DLLs into the output directory and use a config file or other means to set resource paths outside of the output directory.

Share this post


Link to post
Share on other sites
Bacterius    13165

Just don't make your application depend on stuff inside a Release folder - copy whatever is needed (in the proper debug/release configuration) inside a folder for each build configuration, and run it there (via a build script or other). That way you don't have hidden dependencies in your build system and can build in debug or release mode without headaches.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this