我正在维护一个MFC应用程序,在某些情况下,它会停止响应30秒,有时1分钟或更长时间。我应该解决这个问题,我尝试跟踪这个类中的codeall方法,但问题仍然存在,我试图在此期间暂停调试,但我没有得到如图所示的任何信息

我想知道如何跟踪导致应用程序停止响应的代码
发布于 2013-12-13 20:55:36
添加监视变量
- increment each watch variable inside its thread
- also very useful can be flag if the thread/event is executing (especially for events)
- you must set this flag on enter
- end clear before exit
- either use some debug print inside your App.
- or use separate Window
- or even better separate App connected with any IPC method. (this will work even if your App UI hangs)
当应用程序挂起时,只需查看哪些变量在递增,哪些没有递增
有了旗帜,你就可以确定你身上挂了什么…
祝你在调试时好运。
https://stackoverflow.com/questions/20542393
复制相似问题