Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Debugger skips over breakpoints

My Visual Studio 2008 IDE is behaving in a very bizarre fashion while debugging a unit test: I have a breakpoint and when I hit it and then try to step with F10 the test concludes. If I Set breakpoints on every line inside the method being tested I will end up at a random one, not the next one on the following line. I have cleaned and rebuilt the solution after a clean system restart. The behavior persists. Has anyone else experienced this and come to a conclusion.

This test only used the main execution thread (no additional threads are being created)

like image 515
My Other Me Avatar asked Jan 08 '10 09:01

My Other Me


People also ask

Why does Visual Studio not stop at breakpoint?

This problem occurs because ASP.NET debugging isn't enabled on the application.

What happens when you execute the run -> skip all breakpoints command?

Visual Assist extends the debugging functionality of Visual Studio with a command to skip all breakpoints. When the command is executed, enabled breakpoints retain their enabled state but are automatically skipped, effectively disabling them.

How do I fix breakpoint in Visual Studio?

To disable a breakpoint without deleting it, hover over or right-click it, and select Disable breakpoint. Disabled breakpoints appear as empty dots in the left margin or the Breakpoints window. To re-enable a breakpoint, hover over or right-click it, and select Enable breakpoint.

Why is my breakpoint 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.


1 Answers

There was a post VS2008 SP1 hotfix released that solves a number of debugging problems. The KB article is here, the hotfix download is here.


UPDATE: the hotfix download location was retired, I don't know of an alternative download location. Please edit this post if you find one.

like image 84
Hans Passant Avatar answered Oct 05 '22 15:10

Hans Passant