When debugging ASP.NET MVC app, breakpoints are not hit

后端 未结 18 1509
盖世英雄少女心
盖世英雄少女心 2020-12-25 11:45

When trying to debug a ASP.NET MVC app, the breakpoints in my controllers arent getting hit. When entering debug mode they just show an empty red circle with a warning trian

18条回答
  •  无人及你
    2020-12-25 12:40

    I have read and implemented all the suggestions above, to no avail.

    What worked for me is, i simply changed the controller action i was trying to break into to [HttpPost].

    My issue was that i was trying to debug a method decorated with a [HttpGet] attribute routing to a different view and instead of hitting my break point, it keeps routing and displaying the return view.

    Hope this helps someone!

    Happy coding.

提交回复
热议问题