Advertisement Jump to content
Sign in to follow this  
Headkaze

Debug output options for Visual Studio using Release

This topic is 1746 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!