.net 在托管C+中检测调试模式+;

.net 在托管C+中检测调试模式+;,.net,c++,.net-2.0,.net,C++,.net 2.0,检测应用程序是否在托管C++/C++/CLI的调试模式下运行的最佳方法是什么 或者它是用debug构建的?对于常规C++,它很容易(被定义为调试),对于管理我不知道。 array<Object^>^ debuggableAttributes = Assembly::GetExecutingAssembly()->GetCustomAttributes(DebuggableAttribute::typeid, false); Console::WriteLine(debugga

检测应用程序是否在托管C++/C++/CLI的调试模式下运行的最佳方法是什么

或者它是用debug构建的?对于常规C++,它很容易(被定义为调试),对于管理我不知道。
array<Object^>^ debuggableAttributes = Assembly::GetExecutingAssembly()->GetCustomAttributes(DebuggableAttribute::typeid, false);

Console::WriteLine(debuggableAttributes->Length > 0);
或者它是用debug构建的?对于常规C++,它很容易(被调试),对于管理我不知道。< /P> <代码>数组^ Debug GababyAtgs:Cuff::GETExcutuCuffCu装配()-> GueCu饰属性(Debug GababelAt::Type ID,false);
array<Object^>^ debuggableAttributes = Assembly::GetExecutingAssembly()->GetCustomAttributes(DebuggableAttribute::typeid, false);

Console::WriteLine(debuggableAttributes->Length > 0);
控制台::WriteLine(debuggableAttributes->Length>0); (在调试模式下编译时,编译器会向程序集添加DebuggableAttribute)

数组^DebuggableAttribute=assembly::GetExecutionGassembly()->GetCustomAttributes(DebuggableAttribute::typeid,false);
控制台::WriteLine(debuggableAttributes->Length>0);
(在调试模式下编译时,编译器向程序集添加DebuggableAttribute)