I was having some problems with my breakpoints later in my program saying that they would not be hit because the source code and the compiled code was different. I decided to put a break point on my public MainWindow() function, and see what happened.
Now I get the error that Entering break mode failed for the following reason: Source file 'F:\cAdmin\OO\OO\MainWindow.xaml.cs' does not belong to the project being debugged.
I find this funny because my project is stored on my flash drive (L:) and not F:.
I have rebuilt my project and cleaned it (many times), restarted my computer, moved my Flash drive, and anything else that I can think of.
Delete the solution user options (.suo) file.
If you experience "funny" debugging issues, it usually means the suo file is corrupt.
Delete the solutions suo file. This has fixed weird debugging problems with breakpoints every time for me. Note, you will lose your solution settings, such as bookmarks, breakpoints, and such.
See Visual Studio 2008 - The breakpoint cannot be hit.
Visual Studio 2012 Update 3
Didn't work:
Did work:
Tools->Options->Debugging->Edit and Continue->uncheck Edit and Continue checkbox
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With