Question

In Visual Studio 2013 Ultimate, if I edit my C# file (ASP.NET project) and then press F5, without explicitly saving, breakpoints are not hit. They are shown at runtime as empty red circles. If I save, then press F5, they work as expected. Even though saving before build is happening, I assume for some reason the debugging is happening against an older assembly? Holding the pointer over the empty circle reports "The breakpoint will not be hit. Source code is different from original version... to allow this disable the option 'Require source files to exactly match'"

I have tried resetting all my options to the defaults, but it still happens.

To exhibit this behavior, the edit seems to require a code change, not just adding a comment.

Tried all these but nothing works: "The breakpoint will not currently be hit. The source code is different from the original version." What does this mean?

Possible klunky fix:

However, I have experimentally added a post-build event, calling a small exe that does Thread.Sleep(5000). This seems to fix the problem! So is my PC just too damn fast?!

Was it helpful?

Solution

I discussed this with MS, and they suggested the following on the command line

devenv /resetuserdata

This has fixed my problems. Don't forget to save your VS settings first, if you want keep them.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top