views:

1191

answers:

4

Often, when I have a breakpoint on some line in Visual Studio, The program will run and stop there. great. I will then click the red circle (or press F9) to remove it. Obviously I don't want my program to keep stopping there. The problem is that the next time I refresh the page the breakpoint is back! The only way to permanently remove it is to open the breakpoints window and remove it there. Why does this happen and how can I change this behavior?

I have noticed that these breakpoints which keep coming back have a little plus next to them in the breakpoints window which when you click on - open up many sub lines of breakpoints. What is the deal with that?

Thanks, Adin

+4  A: 

Just clear the breakpoint while the debugger is off. When you clear or add a breakpoint while debugging, the action only lasts for that debugging session.

Joel Coehoorn
It is good to know this but this isn't any better than what I wrote (using the breakpoints window to remove the breakpoint permanently). I was looking for an easier solution, not one that made me stop everything for it to work. I was hoping there was a preference to change to something like Shift F9
adinas
+10  A: 

Helpful Key combo: to permanently delete all breakpoints, press CTRL + SHIFT + F9.

Jon Dewees
+1  A: 

The plus in the breakpoints window is there when one user-supplied breakpoint binds in multiple places. This can happen when a single file is loaded multiple times in the same debugging session, for example. The + lets you look at each of the places it bound.

@Joel: modifying breakpoints during a debugging session does not make your change temporary, although there are circumstances (like the original question), where the actual behavior can be non-obvious.

Jay Bazuzi
Thanks for the explanation
adinas
If you like it, would you be willing to vote it up? Or accept it if you think it's the answer you're looking for.
Jay Bazuzi
+1  A: 

I've post suggestion to MS to fix it: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=391642

Michael Freidgeim