Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugger stops when there is no breakpoint VS2010

I recently changed one of the options in the debugger and I think that is what is causing this problem but I can't seem to 'undo' it...I google and all hits come back with the opposite 'why does the debugger not stop on a breakpoint'

anyway can someone shed some light?

EDIT: when I press f5 in debug mode. Everytime. It goes into the Program.cs and stops on

Application.SetCompatibleTextRenderingDefault(false);

in the Main()

like image 929
kurasa Avatar asked Oct 25 '11 22:10

kurasa


People also ask

What happens when a breakpoint is reached when the debugger is enabled?

If a breakpoint is reached, or a signal not related to stepping occurs before count steps, stepping stops right away. Continue to the next source line in the current (innermost) stack frame. This is similar to step , but function calls that appear within the line of code are executed without stopping.

Why are my breakpoints not working?

If a source file has changed and the source no longer matches the code you're debugging, the debugger won't set breakpoints in the code by default. Normally, this problem happens when a source file is changed, but the source code wasn't rebuilt. To fix this issue, rebuild the project.

How do I keep debugging in Visual Studio?

In most languages supported by Visual Studio, you can edit your code in the middle of a debugging session and continue debugging. To use this feature, click into your code with your cursor while paused in the debugger, make edits, and press F5, F10, or F11 to continue debugging.


2 Answers

Old thread I know, But I just encountered the same problem. All I did was a Delete All Breakpoints (Ctrl+Shift+F9 for me), then a Clean on my startup project, followed by a Rebuild, then Run. After that it stopped breaking where there were no breakpoints.

like image 83
Chris Ray Avatar answered Nov 06 '22 04:11

Chris Ray


I just experienced the same problem however mine isn't due to a option change. I think I have found the reason why but no resolution to fix it. I have a Solution with multiple projects, the projects involved are:

  • Business Logic
  • Data Access
  • Console App

In both BL and DA I have a class called Credit.cs. Both classes are in different namespaces.

When I set a breakpoint on line 235 in BL.Credit.cs then the debugger stops on line 236 in DA.Credit.cs even though there are no breakpoints set. I think this is a bug in Visual Studio.

When I remove the breakpoint in BL is subsequently does not stop in the DA either.

I have submitted a bug if you wish to vote https://connect.microsoft.com/VisualStudio/feedback/details/699804/debugger-stops-on-same-line-in-different-class-where-there-is-no-breakpoint

like image 23
Eugene Niemand Avatar answered Nov 06 '22 03:11

Eugene Niemand