簡體   English   中英

Visual Studio Community 2015調試器在條件斷點處以“不支持本機方法的評估”結束 - 我該如何解決?

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM