[英]Visual Studio Community 2015 debugger ends at conditional breakpoint with “Evaluation of native methods is not supported” - how do I fix?
我有一个条件断点,条件检查字符串的值,如果是真的则停止。 它会停止,但随后会打开一个窗口说:
The condition for a breakpoint failed to execute ... The error returned was 'Evaluation of method System.Collections.Specialized.NameValueCollection.get_Item() calls into native method 'System.Globalization.TextInfo.Internal.GetCaseInsHash(). Evaluation of native methods in this context is not supported.'. Click OK to stop at this breakpoint.
我搜索了答案,但他们说启用托管兼容模式,但没有用。
检查项目调试设置下的“启用Visual Studio托管过程”为我解决了这个问题。
你也许也可以手动将断点添加到你的代码中,就像这样......
if (conditionThatMeansStop)
{
System.Diagnostics.Debugger.Break();
}
这就是我的方式......
Evaluation of method System.String.op_Equality calls into the native method System.Environment.FailFast()
...在类似的情况下,我试图设置检查字符串值的条件端点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.