Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging not hit breakpoints in .NET CORE MVC 6 application

I am working on .NET CORE 1.0 MVC 6 application and I stuck with the debugging point as it stopping hitting yesterday. with number of try I delete project and start again. First time it load symbols even due I have uncheck in Tool --> Debugging --> symbols, however it hit breakpoints. Now it only hitting C# class 'Startup.cs' if I choose 'Enable Just My Code' but in controller. I have Debug option from dropdown, not really sure why. Need help here.

enter image description here

enter image description here

enter image description here

I change as

Select Debug->Options->Debugging->General

Tick Enable .NET Framework source stepping.

but still no success

enter image description here

Module

enter image description here

Trying to Hit in Controller home class for MVC Core in Index and about

 public class HomeController : Controller
{
    public IActionResult Index()
    {
        var x = 2 + 3;

        return View();
    }

    public IActionResult About()
    {
        var x3 = 2 + 6;
        var xx = "dd";

        ViewData["Message"] = "Your application description page.";

        return View();
    }

Debugging output

enter image description here

like image 235
K.Z Avatar asked Nov 16 '16 09:11

K.Z


1 Answers

While Jack Zhai-MSFT's solution worked I still had some weird behavior: breakpoints were working partially. Found solution here that works perfectly: Breakpoint Failed to Bind - Visual Studio 2015 While the above link is loaded with tons of solutions in my case changing configuration from Release to Debug under Build menu Configuration Manager solved all my breakpoints related problems.

like image 176
Richard Mneyan Avatar answered Sep 20 '22 13:09

Richard Mneyan