为什么 Visual Studio 中的 F10(跳过)不起作用?

发布于 2024-07-19 14:35:02 字数 215 浏览 5 评论 0原文

我正在 Visual Studio 2008 中调试一个(Web)项目。我遇到了断点。 正如预期的那样,F10 继续到下一行,但下一个 F10 只是停止调试,代码将继续,不再进行任何调试(就像按 F5)。 为什么会发生这种情况?

  • 我尝试过“干净的解决方案”。
  • 有时(!)会跳过其他断点,即使是在相同的方法中 有

任何线索吗?

I'm debugging a (web) project in Visual Studio 2008. I'm hitting a breakpoint. F10 continues to the next line, as expected, but the next F10 just stops debugging and the code continues without any more debugging (like pressing F5). Why is this happening?

  • I have tried 'clean solution'.
  • Other breakpoints sometimes(!) skipped, even in the same method

Any clues?

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

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

发布评论

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

评论(8

姐不稀罕 2024-07-26 14:35:02

这可能是因为您没有 Visual Studio 2008 的更新 kb 957912。
这在我的机器上解决了同样的问题。

It is probably because you do not have the update kb 957912 for Visual Studio 2008.
That fixed the same issue on my machine.

北方。的韩爷 2024-07-26 14:35:02

确保您处于调试模式而不是发布模式。

Make sure that you're in Debug mode not in Release.

椒妓 2024-07-26 14:35:02

如果不了解有关应用程序的更多信息,就很难说,但通常当进程启动线程或进入没有任何调试信息的代码时,就会发生这种情况。

Without knowing more about your application it's difficult to say, but usually this sort of thing happens when the process starts a thread or otherwise goes into code where there isn't any debug information.

咆哮 2024-07-26 14:35:02

执行相关指令时可能会出现异常。 尝试启用所有异常以闯入调试器并进行检查。

There could be an exception while executing the instruction in question. Try enabling all exceptions to break into debugger and check.

夏末 2024-07-26 14:35:02

听起来您几乎拥有调试的默认设置。 如果你去:
工具
- 选项
- 调试
在常规部分下有一个选项“仅启用我的代码”
默认情况下,它是选中的,如果取消选中,您应该能够单步执行您想要查看的代码。

在不了解有关您引用的项目和代码的更多信息的情况下,这是我对您无法单步执行代码的最佳猜测。

希望能帮助到你
日韩

It almost sounds like you have the default settings for your debugging. If you go to:
Tools
- Options
- Debugging
Under the general section there is a option to "Enable Just My Code"
By default that is checked, if you uncheck that you should be able to step into the code that you want to see.

Without knowing more about your project and code that you reference, this is my best guess as to why you can’t step into the code.

Hope it helps
Rihan

毅然前行 2024-07-26 14:35:02

F10 是跨步。 这意味着当前方法调用的任何方法都不会显示在调试器中。 如果这些抛出未捕获的异常或以某种方式结束执行,调试将结束,这将导致您遇到的情况。

单步执行代码时,F11(单步执行)通常是一个更好的主意。

F10 is Step Over. This means that any methods called by your current method will not be shown in the debugger. If these throw an uncaught exception or somehow end execution, debugging will just end, which would result in what you are experiencing.

F11 (Step Into) is usually a better idea when stepping through code.

陌上芳菲 2024-07-26 14:35:02

它可能会跳过线程中最后执行的代码,或者以某种方式返回到 UI 线程。 如果它是 GUI 应用程序,请尝试执行一些调用事件处理程序的操作,并查看它是否在下次执行时中断。

It might be stepping over the last executing code in the thread or somehow it's going back to the UI thread. If it's a GUI app, try doing something that invokes an event handler and see if it breaks on the next execution.

左耳近心 2024-07-26 14:35:02

我在开发在本地计算机上的 IIS 上运行的 Web 应用程序时遇到了这个问题。 我发现打开任务管理器并终止进程(w3wp),然后重试可以使问题暂时消失。

I was having this issue while developing a Web App that was running on IIS on my local machine. I found that opening the task manager and killing the process (w3wp), then trying again made the problem go away temporarily.

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