在内置 Web 服务器上调试 ASP.NET 突然停止
我有 Windows Server 2008(64 位)、带有内置 Web 服务器的 VS 2008 和 ASP.NET MVC 1.0 Web 应用程序。
我想做的就是调试所述应用程序。我有很多断点,但它们的行为方式非常奇怪。当我首先使用 F5 启动调试会话并命中断点时,调试器会正常停止。然而,在几次 F10/F11 调试之后突然“停止”(当时没有例外),但 VS 既没有脱离浏览器进程,也没有停止执行 Web 应用程序:Visual Studio 保持连接状态,Web 请求继续照常执行。
我尝试了各种浏览器(Chrome、Firefox、IE),但没有成功。
我该怎么做才能解决这个问题?这真的让我发疯。
I have Windows Server 2008 (64-bit), VS 2008 with its built-in webserver and an ASP.NET MVC 1.0 webapp.
All I'm trying to do is to debug said app. I have a bunch of breakpoints, but they behave in a very strange way. When I fist start a debugging session with F5 and hit a breakpoint, the debugger stops just fine. However, after several F10s/F11s debugging suddenly "stops" (no exceptions at that time), but neither VS detaches from browsers' process, nor webapp execution stops: Visual Studio stays attached, and web request continues executing as usual.
I tried various browsers (Chrome, Firefox, IE), but to no avail.
What do I do to solve this? It really drives me insane.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以停止使用 F5 并使用 Debug ->改为附加到进程。我发现这消除了我遇到的一些调试附件问题。
You could stop using F5 and use Debug -> Attach to Process instead. I have found that this gets rid of some of the debugging attachment issues that I have had.
明白了。 Web 应用程序中有一个后台线程正在运行,每当它抛出异常(未捕获)时,调试会话就会停止。
Got it figured. There was a background thread running in a webapp, and it whenever it happened to throw an exception (which was not caught), debugging session would stop.