Visual Studio 退出调试没有任何异常或错误 [英] visual studio exits debugging without any exception or error

查看:47
本文介绍了Visual Studio 退出调试没有任何异常或错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Visual Studio 2010 中有一个 TCP/CLIENT 游戏服务器项目.当我在调试模式下启动项目时,一段时间后(有时 1 天,有时 1 周)Visual Studio 退出调试,没有任何异常或错误.我检查了 Windows 和应用程序日志,没有任何意外.

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.

我怎样才能找出真正的问题是什么或什么(例如像stackoverflow这样的一些异常)会导致Visual Studio退出调试?

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?

推荐答案

我假设您的应用程序是多线程的.在这种情况下,后台线程中未捕获的异常将使您的应用程序崩溃.它也会停止您的调试器,因为它不能一次调试所有线程,应该使用线程窗口手动切换到特定线程.所以解决方案是在异步处理程序中捕获异常并至少记录它们.

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.

这篇关于Visual Studio 退出调试没有任何异常或错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆