How to determine at runtime when your C++ application has the visual studio debugger attached?

我的未来我决定 提交于 2021-02-07 14:28:34

问题


How do you determine at runtime whether the visual studio debugger is attached to your process. I've seen instructions for how to do this in .NET, but my process is a native C++ process. Support for detecting Just-in-time debugging would be nice but not a strict requirement.


回答1:


The Win32 call IsDebuggerPresent() sounds like it ought to work.




回答2:


Use IsDebuggerPresent



来源:https://stackoverflow.com/questions/2789390/how-to-determine-at-runtime-when-your-c-application-has-the-visual-studio-debu

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