问题
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.
回答1:
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.
回答2:
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.
来源:https://stackoverflow.com/questions/2849211/debugging-asp-net-on-a-built-in-web-server-suddenly-stops