Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Visual Studio 2010's C# debugger continue instead of stepping over? [duplicate]

Possible Duplicate:
Visual Studio 2010 debugger skipping

If I break at a breakpoint in visual studio (C#), I can step over statements quite happily. Occasionally though, it ignores the step over and it's as though I'd hit continue instead.

It is not repeatable.. immediately re-running and breaking on the same point and stepping over will sometimes work fine, or will fail to step over on a different statement.

It may be my imagination, but the faster I step over things, the more reliable it seems. As though it's timing out on something.

My app is a single-threaded app debugging a method via MSTest.

Update

It seems to be more repeatable if I inspect things in the debugger, e.g. expand the 'this' reference in the locals window. It's not 100% repeatable though.

like image 274
izb Avatar asked Nov 24 '10 13:11

izb


People also ask

Does Visual Studio use C?

The Visual Studio build tools include a C compiler that you can use to create everything from basic console programs to full Windows Desktop applications, mobile apps, and more.

Is Visual Studio Code good for C?

With the addition of extensions, VSCode is a great tool for quickly accessing and editing C++ code, whether you are a beginner or an advanced developer. With the addition of an open source compiler that is native to your platform, you can use VSCode as a complete tool for building your C++ solutions.

Is Visual Studio 2010 obsolete?

Visual Studio 2010 - Microsoft Lifecycle | Microsoft Learn. This browser is no longer supported. Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

What C standard does Visual Studio use?

MSVC C/C++ compiler reference - Visual Studio.


1 Answers

This is a known problem, it seems to strike particularly often in a unit test scenario. The bug has been identified by the Debugger team as of October 1st, getting it to your machine is what tends to take a while. The feedback article is here, vote it up and keep an eye on it. If this will be a hotfix instead of rolled into the next service pack then it will be published here.

UPDATE: this was a regression from VS2008, a post-SP1 hotfix repaired it but the hotfix updates didn't make it into the VS2010 code base. It was again fixed in VS2010 SP1.

like image 101
Hans Passant Avatar answered Oct 05 '22 18:10

Hans Passant