Alex Rivera | Logout

Why have separate Debug and Release folders in Visual Studio?

Asked 2010-01-12T15:00:18.930
25

By default, of course, Visual Studio creates separate bin folders for Debug and Release builds. We are having some minor issues dealing with those from the perspective of external dependencies, where sometimes we want release binaries and sometimes debug. It would make life slightly easier to just have a single bin folder on all projects and make that the target for both Debug and Release. We could then point our external scripts, etc. at a single location.

A co-worker questioned why we couldn't just do that--change the VS project settings to go to the same bin folder? I confess I couldn't really think of a good reason to keep them, other than easily being able to see on my local filesystem which are Debug and which are Release. But so what; what does that gain?

My question(s):

  • How do you leverage having distinct Debug and Release folders? What processes does this enable in your development?
  • What bad thing could happen if you fail to retain this distinction?
  • Inversely, if you have gone the "single folder" route, how has this helped you?

I am NOT asking why have separate Debug and Release builds. I understand the difference, and the place of each. My question concerns placing them in separate folders.

Edit
Report

1 Answer

0

What everyone elsesaid about technical aspects are important. Another aspect is that you may run into race conditions if one build relies on the single-output-location build, but there's no synchronization between the two builds. If the first build can be re-run (especially in a different mode) after the second build starts, you won't really know if you're using a debug of release build.

And don't forget the human aspect: it's far easier to know what you're working with (and fix broken builds) if the two builds output to different locations.

answered 2010-02-16T05:41:37.937

Your Answer