开发者

Checking if Debugger is present in c++ dll (loaded in C++/CLI wrapper)

开发者 https://www.devze.com 2023-03-17 22:57 出处:网络
I\'m checking if a debugger is present in my c++ dll with method if(IsDebuggerPresent()) // set dll name to debug

I'm checking if a debugger is present in my c++ dll with method

if(IsDebuggerPresent()) // set dll name to debug

When I load this dll in my C++/CLI wrapper (debug mode in VS) the method always returns false (release) -> why is it so? (or which code I need to开发者_StackOverflow社区 determine this information)

Thank you for your help!

greets leon22


System.Diagnostics.Debugger.IsAttached returns true if a debugger is attached to your application. Is this what you are trying to achieve?


That was the solution: just enable unmanaged debugging ! (msdn.microsoft.com/en-us/library/tdw0c6sf.aspx)

0

精彩评论

暂无评论...
验证码 换一张
取 消