The breakpoint will not currently be hit
I was hit with the dreadful "The breakpoint will not currently be hit" problem this week. Searching the Web, looks like it is a common problem both with VS 2005 and 2008 however, it was the first time I experienced it.
The symptom
You have a solution with a client project and a Web or WCF project. You place breakpoints in both projects so you can step thru the code on both side. You break in your client code but you can’t jump in the Web/WCF code. When you look at the Web/WCF breakpoint while debugging, the red dot displays an exclamation mark and this message: "The breakpoint will not currently be hit".
The solution
Looks like there are many solutions to the problem. Here’s what I did:
- Checked that VS was not in release mode. Nope, I was in debug mode.
- Deleted the \bin\debug folders. No good.
- Deleted both the \bin\debug and \obj folders. No good.
- Deleted all source code and retrieved everything from source control. No good.
Out of three developers, I was the only one with the problem so I checked if my VS debugging settings were changed. Nope, we all had the same settings. - Tried to reset my settings anyway with devenv /resetsettings. No good.
- Started a new solution with a simple WCF project and a Console app client. No good, same problem so it's really VS, not the code.
- Tried a VS repair. No good.
- Uninstalled and reinstalled VS completely. Bingo, it worked!
The problem
I have absolutely no clue. Anyone has an idea on why this problem happens?