Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to open file with breakpoint after debug

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.

like image 858
Mike07 Avatar asked Mar 13 '13 14:03

Mike07


People also ask

Why my breakpoints are not working?

If a source file has changed and the source no longer matches the code you're debugging, the debugger won't set breakpoints in the code by default. Normally, this problem happens when a source file is changed, but the source code wasn't rebuilt. To fix this issue, rebuild the project.

Why is my debugger not working in VS Code?

Debugger not working Look at the debugger console for any error messages displayed. Look at the Debugger Tools console output for any errors. Remember to re-start VS Code once done (this won't be necessary in a future release). Solution: Clear all expressions from the debugger Watch window and start debugging again.

How do I Debug a breakpoint in Visual Studio?

To set a breakpoint in source code: Click in the far left margin next to a line of code. You can also select the line and press F9, select Debug > Toggle Breakpoint, or right-click and select Breakpoint > Insert breakpoint. The breakpoint appears as a red dot in the left margin.


1 Answers

I had this same error when trying to open one of my .cs files from Visual Studio. It turns out that I had WAY too many files open at once and I must have been hitting some sort of internal limit. After closing all open files in VS it stopped happening for me.

like image 194
MisterZeeba Avatar answered Oct 31 '22 03:10

MisterZeeba