簡體   English   中英

執行代碼時找不到 ExecutionTimer.cs

[英]ExecutionTimer.cs not found when stepping into code

我正在使用 XUnit 框架編寫一些測試,並且必須使用一些通過 dll 引用的外部代碼。

當我嘗試進入方法調用 helper.GetEntity() 時,我得到以下窗口並且執行存在。

[Fact]
public void PassingTest()
{

    var datapointJson = File.ReadAllText(@"sample.json");
    dynamic datapointObject = JsonConvert.DeserializeObject(datapointJson);

    // This is referenced from a different project in the same solution.
    var helper = new Helper.Actions();
    var studentEntity = helper.GetEntity("tom");
}

找不到 Execution.cs

有誰知道為什么會這樣?

問候。

(張貼@camilo-terevinto 的評論作為答案)

在 Visual Studio 中啟用“僅啟用我的代碼”| 工具 | 調試 | 將軍。

在此處輸入圖片說明

所以我也在這個問題上掙扎了 2 天,我在網上找到的任何東西都沒有幫助我,但是 @pauldendulk 的回答引導我找到了解決方案。 在 Options -> Debbuging -> Just-in-Time 下,我注意到“Managed”復選框未標記,並且有一個警告標簽,上面寫着“多個調試器的鬃毛代碼......請修復 Visual Studio 以恢復......” (抱歉,我沒有截取屏幕截圖並且不記得正確的措辭,但它是在那個上下文中)。

通過“Visual Studio 安裝程序”運行 Visual Studio 2017(社區版)修復后,測試調試按預期工作。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

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