2

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!!

Juergen
  • 12,378
  • 7
  • 39
  • 55
Etienne
  • 7,141
  • 42
  • 108
  • 160
  • 3
    Are the breakpoints looking normal = a completely filled red circle? Or is only the border red? There can be a warning sign on breakpoints - draw your mouse pointer over it and you can read the problem. – tanascius Aug 05 '09 at 13:20
  • They are fully red, but it does not even get to my Page Load sometimes. So yes it does not change to yellow. – Etienne Aug 05 '09 at 13:25

5 Answers5

7

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).

Jesper Fyhr Knudsen
  • 7,802
  • 2
  • 35
  • 46
2

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.

Richard Anthony Hein
  • 10,550
  • 3
  • 42
  • 62
1

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

user72012
  • 21
  • 1
0

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.

0

There's a hotfix for various debugger problems in VS 2008 SP1, have you tried that?

Niki
  • 15,662
  • 5
  • 48
  • 74
  • Yip, i do have SP1 installed. But its not just VS2008, i have expereince this with VS2005 as well and as well as on diff. PC's. – Etienne Aug 07 '09 at 11:19