问题
I have a TCP/CLIENT
game server project in Visual Studio 2010. When I start the project in debug mode, some time later (sometimes 1 day, sometimes 1 week) Visual Studio quits debugging without any exceptions or errors. I checked the windows and application log and there is nothing unexpected there.
How can I find out what the real problem is or what (e.g. some exceptions like stackoverflow) can cause the Visual Studio exit debugging?
回答1:
I assume that your application is multithreaded. In that case uncaught exception in a background thread will crash your application. It will stop your debugger as well since it can't debug all threads at a time and should be manually swiched to a specific thread using Threads window. So the solution is to catch the exceptions in async handlers and at least log them.
回答2:
This worked for me (for a similar problem - not exactly this); try to reset Visual Studio environment:
devenv.exe /ResetSettings
回答3:
If you are running something as server in IIS, you can try to disable health monitoring for your server project. So open IIS and right click the application pool. Find the Ping enabled
setting, it's under advanced settings and set it to False
. An other option is to increase the maximum response time. This is a better solution I think. Set it to about 600 seconds.
If you are debugging for a week, use intellitrace. You can use this youtube video about intellitrace in Visual Studio 2010 as reference.
来源:https://stackoverflow.com/questions/16790828/visual-studio-exits-debugging-without-any-exception-or-error