簡體   English   中英

在Visual Studio中進行調試時,從來沒有點擊.Net Reflector中的反編譯程序集中的斷點

[英]Breakpoint put in decompiled assembly from .Net Reflector is never hit while debugging in Visual Studio

首先,我創建了一個測試程序集HelloWorld.dll ,我想調試它並使用發布配置構建它。

namespace HelloWorld
{
    public class HelloClass
    {
        public string SayHello(string name)
        {
            return "Hi " + name + "!";
        }
    }
}

然后我創建了標准的ASP.NET MVC項目並:

  • 引用的HelloWorld.dll程序集
  • 修改了HomeController的About方法

     public ActionResult About() { var testingClass = new HelloClass(); ViewBag.Message = testingClass.SayHello("John"); return View(); } 
  • 通過.NET Reflector對象瀏覽器反編譯HelloWorld程序集

  • 將斷點放在SayHello方法中(在反編譯文件中)
  • 在IIS express或IIS中運行debug並請求~/Home/About頁面

結果:Brekpoint從未被擊中。

當我去Debug -> Windows -> Modules ,似乎加載了HelloWorld.dll程序集的符號: 在此輸入圖像描述

那么,我做錯了什么?

編輯:我正在使用Visual Studio 2015 Update 1和RedGate Reflector 8.5

經過數小時和數小時的研究並聯系RedGate支持,它似乎是他們軟件中的一個錯誤。

解決方法:

  1. 使用Visual Studio 2013,它按預期工作
  2. 在VS 2015中,轉到.NET Reflector -> Generate PDBs並選擇C# versionv4.5 Reflector在C# version v4.6存在一些問題 選擇要調試的程序集

暫無
暫無

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

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