Unable to open file with breakpoint after debug

.net, debugging, visual-studio-2012

Solution

To stop ALL files from being closed after debugging simply go to

Tools > Import and Export Settings > Reset Settings

This will fix this bug, I have the old settings saved that caused this error but I am unsure what specifically causes it within the settings. After frustratingly searching around for a clear answer to this problem I hope this helps others that might have this issue.

Problem

I have a weird problem. Whenever I start to debug and stop the debug if a file has a breakpoint I won't be able to open it directly in Visual Studio. I have ReSharper 7.1 and StyleCop installed but disabled and installed VS 2012 Update 2 but it didn't fix my problem. If I click on the breakpoint I get an error: ``` Unable to go to the breakpoint. The ViewManager.ActiveView must be a View contained within the ViewManager.WindowProfile. ``` And if I debug again and Visual Studio has to hit the breakpoint, I get: ``` 'TheFile' not found. You need to find 'TheFile' to view the source for the current call stack frame. ``` The only solution to get my file to open again is to close and reopen Visual Studio.

Original source