为什么 Visual Studio 2010 的 C# 调试器会继续而不是跳过?

发布于 2024-10-04 04:05:03 字数 504 浏览 0 评论 0原文

可能的重复:
Visual Studio 2010 调试器跳过

如果我在 Visual Studio (C#) 中的断点处中断,我可以很高兴地跳过声明。但有时,它会忽略该步骤,就好像我会点击“继续”。

它是不可重复的..立即重新运行并在同一点上中断并跳过有时会很好地工作,或者无法跨过不同的语句。

这可能是我的想象,但我越快迈过去,它看起来就越可靠。好像某件事已经超时了。

我的应用程序是一个单线程应用程序,通过 MSTest 调试方法。

更新

如果我检查调试器中的内容,例如在本地窗口中展开“this”引用,它似乎更具可重复性。但它并不是 100% 可重复的。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

何止钟意 2024-10-11 04:05:04

这是一个已知问题,它似乎在单元测试场景中特别频繁地出现。截至 10 月 1 日,调试器团队已发现该错误,将其发送到您的计算机通常需要一段时间。反馈文章 在这里,投票并关注它。如果这将是一个修补程序而不是纳入下一个服务包,那么它将是 在这里发布

更新:这是 VS2008 的回归,SP1 后的修补程序修复了它,但修补程序更新并未进入 VS2010 代码库。在 VS2010 SP1 中再次修复了该问题。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文