A week ago something broke in my Visual Studio.

Before I was building release and debugging almost at the same time. I pressed F6 to stop debugging and build release version ("bin\Release"). Then press F5 to start debugging which of course builds the debug version ("bin\Debug") and starts it. My workflow was very fluent. It was good.

F6 triggers Menu -> Build -> Rebuild Solution (I expect to rebuild the release version)
F5 triggers Menu -> Debug -> Start Debugging (I expect to (build and) run the debug version)

After I now have to find my mouse, find the cursor, navigate it to the menu, activate "Standard" toolbar (because I have it hidden, because it takes my vertical space), then switch to release to build release version. And if I forget to switch back to debug, it is debugging in release. It's very annoying. No workflow!

How can I change it back? I never cared for configurations in Visual Studio, since I know release is optimized and its location. And debug is not optimized and looked over so that when exception happens, the app is halted. I imagine Visual Studio was switching configurations automatically for me. Now it stopped doing that. Maybe I pressed the wrong shortcut-keys. I want to go back.

  • I've just recently experienced the same issue. Were you ever able to figure out why this changed for you? Dec 1, 2021 at 21:41

1 Answer 1


The way it's working now is the way that Visual Studio has been working for many years.

It's entirely possible to debug the release version. I have done so many times, for finding a bug that only arrived in the release version.

Debugging with F5 will only create the debug version if the current project is debug, but will create the release version if not.

There is one case where F5 in release mode will debug the debug version, and that is when the existing debug .exe is more recent than any source or object file in the project release tree, so there is no need to recreate it. Visual Studio does not remember how it created the .exe, so its only concern is with timestamps.

In short, it's not Visual Studio that changed, but rather your work environment. You need to take care when running the project not only of what you do now, but also of what was done before.

I suggest very strongly to give different names to the debug and release versions of the .exe. Using two distinct names for the two .exe versions will avoid the kind of errors that you are encountering.

  • That's not exactly true. While there have always been a "Release" and "Debug" configuration available for Visual Studio, the IDE has always "auto-switched" between the two for me up until recently. I've never had to manually switch between the two configurations in the past. Usually, when I would click "Build" or "Rebuild", the IDE would compile everything into the "Release" folder, even if my configuration was set as "Debug". I'm not sure why the IDE's behavior has changed, but it's rather annoying and I'm trying to find whatever setting will get me back to where I was. Dec 1, 2021 at 21:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .