为什么 Visual Studio 有时无法到达我的断点?

发布于 2024-07-30 03:32:28 字数 166 浏览 2 评论 0原文

我一直在使用 Visual Studio 2005 和 2008,我注意到有时当我在代码中放置断点时,它不想转到断点。 所以我重新启动我的电脑,然后它又可以工作了。 好像有什么东西卡住了? 这种事只发生在我身上吗??? 我怎样才能防止这种情况发生! 这让我发疯!

提前致谢!!

I have been using Visual Studio 2005 and 2008 and i have noticed that sometimes when i place break point in my code that it does not want to go to the break point. So i restart my PC and then it works again. Its like something get's stuck? Does this only happen to me???
How can i prevent this! It is driving me nuts!!

Thanks in advance!!

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

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

发布评论

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

评论(5

绅士风度i 2024-08-06 03:32:28

通常,这是因为自放置断点以来,您正在查找的代码尚未编译,因此您测试代码/单元测试正在针对过时的 DLL 运行。

这可能就是发生在你身上的事情。

检查您的构建经理,并确保所有项目都已检查。

编辑:
转到“构建”->“配置管理器”并确保 [构建] 复选框全部选中,这将确保在构建解决方案时编译每个项目 (Ctrl+shift+b)。

Often this is because the code you are looking hasn't been compiled since you placed the breakpoint, so you test code / unit test, is running against an outdated DLL.

This might be what's happening to you.

Check out your build manager, and make sure all the projects are checked.

Edit:
Go to Build->Configuration Manager and make sure the [Build] checkboxes are all checked, that will ensure that every project is compiled when you build the solution (Ctrl+shift+b).

萌︼了一个春 2024-08-06 03:32:28

这取决于您是否正在开发 Web 应用程序,或者您是否有后期绑定代码、其他项目的控件更改等... 跟踪问题的一种方法是查看“调试 - Windows - 模块”窗格,然后查看实际使用的是哪个程序集。 如果要跨越远程处理边界,则在执行代码之前断点不会激活。 如果当断点未完全着色并带有问号时将鼠标悬停在断点上,您还可以获得更多信息。

希望有帮助。

It depends on if you are developing a web application, or if you have late bound code, changes in controls from another project, etc.... One way to track down problems is to look in the Debug - Windows - Modules pane, and see which assembly is actually being used. If you have remoting boundaries to cross, the breakpoint won't become active until the code is executed. If you hover over the breakpoint when it is not coloured in completely and has that question mark, you can also get more information.

Hope that helps.

薯片软お妹 2024-08-06 03:32:28

有一个针对各种问题的修补程序 VS 2008 SP1 中的调试器问题,您尝试过吗?

There's a hotfix for various debugger problems in VS 2008 SP1, have you tried that?

吲‖鸣 2024-08-06 03:32:28

我在 VS 2005 中遇到了同样的问题。

显然 Visual Studio 的设置已损坏。 我从工具/导入和导出设置/重置所有设置重置它们。 现在断点很好。

麦克风

I had the same problem with VS 2005.

Apparently Visual Studio's setting were corrupted. I reset them from Tools/Import and Export Settings/Reset all settings. It's now breakpointing fine.

Mike

情绪操控生活 2024-08-06 03:32:28

不要重新启动计算机,而是尝试选择“构建”->“ 重建解决方案,然后在调试模式下运行。 这通常似乎可以消除诸如此类的小烦人的事情。

Instead of rebooting your computer try selecting build -> rebuild solution and then running in debug mode. That usually seems to clear out little annoying things like that.

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