如何在运行时确定您的 C++ 应用程序何时附加了 Visual Studio 调试器? [英] How to determine at runtime when your C++ application has the visual studio debugger attached?

查看:26
本文介绍了如何在运行时确定您的 C++ 应用程序何时附加了 Visual Studio 调试器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您如何在运行时确定 Visual Studio 调试器是否已附加到您的进程.我已经看到有关如何在 .NET 中执行此操作的说明,但我的进程是本机 C++ 进程.支持检测 Just-in-time 调试会很好,但不是严格要求.

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.

推荐答案

Win32 调用 IsDebuggerPresent() 听起来应该可以.

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

这篇关于如何在运行时确定您的 C++ 应用程序何时附加了 Visual Studio 调试器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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