Web API in MVC Project isn't hitting breakpoints (“symbols not loaded”)

后端 未结 7 1517
死守一世寂寞
死守一世寂寞 2020-12-30 07:05

I have an ASP.NET MVC project, with an ASP.NET web api defined as an area in this project. So the structure is the following:

MVC Web
   Controllers
   View         


        
7条回答
  •  再見小時候
    2020-12-30 07:41

    Until you find a permanent solution you can use the method System.Diagnostics.Debugger.Break() to force a break to occur on that line - just like a breakpoint:

    public ActionResult IndexCheckInOut(string providerKey, DateTime? date = null)
    {
        System.Diagnostics.Debugger.Break();   
        return View("Index");
    }
    

    Here are some links to articles that might help you find a more permanent solution:

    The breakpoint will not currently be hit

    Stepping into ASP.NET MVC source code with Visual Studio debugger

提交回复
热议问题