Reputation: 7201
I have been using Visual Studio 2005 and 2008 and i have noticed that sometimes when i place break point in my code that it does not want to go to the break point. So i restart my PC and then it works again. Its like something get's stuck? Does this only happen to me??? How can i prevent this! It is driving me nuts!!
Thanks in advance!!
Upvotes: 2
Views: 3489
Reputation: 21
I had the same problem with VS 2005.
Apparently Visual Studio's setting were corrupted. I reset them from Tools/Import and Export Settings/Reset all settings. It's now breakpointing fine.
Mike
Upvotes: 1
Reputation: 15867
There's a hotfix for various debugger problems in VS 2008 SP1, have you tried that?
Upvotes: 0
Reputation: 7937
Often this is because the code you are looking hasn't been compiled since you placed the breakpoint, so you test code / unit test, is running against an outdated DLL.
This might be what's happening to you.
Check out your build manager, and make sure all the projects are checked.
Edit: Go to Build->Configuration Manager and make sure the [Build] checkboxes are all checked, that will ensure that every project is compiled when you build the solution (Ctrl+shift+b).
Upvotes: 7
Reputation: 10650
It depends on if you are developing a web application, or if you have late bound code, changes in controls from another project, etc.... One way to track down problems is to look in the Debug - Windows - Modules pane, and see which assembly is actually being used. If you have remoting boundaries to cross, the breakpoint won't become active until the code is executed. If you hover over the breakpoint when it is not coloured in completely and has that question mark, you can also get more information.
Hope that helps.
Upvotes: 2
Reputation:
Instead of rebooting your computer try selecting build -> rebuild solution and then running in debug mode. That usually seems to clear out little annoying things like that.
Upvotes: 0