visual studio exits debugging without any exception or error

こ雲淡風輕ζ 提交于 2020-06-14 03:21:39

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!