Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET 5, DNX & Kestrel: Not hitting breakpoints

Breakpoints are not being hit when debugging our DNX projects referenced in a ASP.NET 5 API project hosted with Kestrel (all in the same solution and in the src folder). Debugging with IIS Express works fine.

What troubleshooting steps can be taken to solve this problem?

No binaries or PDBs are created with DNX projects when debugging, so I am very unsure as to where to start.

project.json commands:

"commands": {
  "web": "Microsoft.AspNet.Server.Kestrel"
},

Project properties:

Project properties

Note: Using the RC1 1.0.0-rc1-final libraries in all projects.

EDIT:

  • Breakpoints in the Startup.cs project are hit just fine, but not in other projects.
  • I have double checked and reinstalled the 1.0.0-rc1-update1 DNX runtime. I have uninstalled all other runtimes.
  • I have confirmed that PATH reflects the DNX runtime correctly.
  • I have deleted all project.lock.json files and DNU restored.
  • The actual breakpoint pin is red and doesn't indicate that there should be any problem.
  • global.json is using the correct runtime:

    {
      "projects": [ "src", "test", "." ],
      "sdk": {
          "version": "1.0.0-rc1-update1",
          "runtime": "clr",
          "architecture": "x86"
      }
    }
    

EDIT 2:

In the Modules window, I can see that the projects' symbols aren't loading:

Modules

How can I fix this?

EDIT 3:

I found that this problem only occurs when running multiple startup projects at the same time. When running a single project, debugging works just fine in all projects within the solution.

enter image description here

I have no idea how to fix this and why it is happening.

like image 769
Dave New Avatar asked Jan 04 '16 13:01

Dave New


People also ask

What is the role of DNX in asp net core?

DNX is the . NET executioner, which is responsible for running your . NET application. Basically, you would install one or more DNX (clr, coreclr, mono) versions.

What is DNX EXE?

DNX, a Dot Net eXecution environment, contains all of the code that is required to bootstrap and run an application. It includes the compilation system, SDK tools and the native CLR host, with NuGet packages being used to access assemblies that are referenced by the application.

What is DNU request?

DNU is used to manage the packages required by an application to run. DNU is used to manage the dependencies in a . NET 5 application by installing or restoring the packages associated with a project (see project. json). This can pull down new versions or repair versions that are not set up correctly.


1 Answers

I filed this issue on the aspnet/Tooling GitHub repository. Consensus is that this is a bug and will only be fixed with the Visual Studio 2015 Update 2 release.

An interim solution is to use a separate instance of VS for each process.

See issue here.

like image 129
Dave New Avatar answered Oct 11 '22 04:10

Dave New