在 Visual Studio 2010 中如何调试类

发布于 2024-09-11 10:11:29 字数 46 浏览 1 评论 0原文

当我在类中设置断点然后访问方法时,调试器不会命中断点。调试类的最佳方法是什么?

When I set a breakpoint in a class then access a method, debugger does not hit breakpoint. What would be best way to debug a class?

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

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

发布评论

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

评论(3

哑剧 2024-09-18 10:11:30
  • 也许您的代码没有到达断点。
  • 也许您编译的代码不是从您打开的源代码编译的。
  • Maybe your code doesn't reach the breakpoint.
  • Maybe your compiled code wasn't compiled from the source that you have opened.
没有你我更好 2024-09-18 10:11:30

您可能希望发布该方法。我的第一个想法是确保您在调试模式下编译,而不是发布模式。

You may wish to post the method. My 1st thought is to make sure you're compiling in Debug mode, not release.

年少掌心 2024-09-18 10:11:30

首先确保您已在调试模式下编译解决方案(选择“调试”作为解决方案配置)。然后确保您正在调试模式下运行(按 F5 或从菜单中选择“调试|开始调试”)。
如果已完成上述操作,则在正在调用的方法中较早地设置断点。如果没有看到您的代码,就无法更具体。

First be sure that you have compiled your solution in debug mode (select Debug as your solution configuration). Then make sure that you are running in debug mode (press F5 or from the menu select Debug|Start Debugging).
If the above have been done then set the breakpoint earlier in the method that is being called. Can't be more specific without seeing your code.

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