Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging two .NET Core projects in Visual Studio at once

I have two .NET Core 2.0 projects, both in the same solution. A Web API project and a Web ASP.NET MVC project. The ASP.NET MVC projects consumes the Web API project.

Is it possible to debug both projects in Visual Studio at the same time or do I need to run one from the command line using dotnet.exe and debug the other?

I would like to end up being able to debug both, place breakpoints in both and for Visual Studio to jump between projects while debugging.

NB: This is in Visual Studio 2017, not Visual Studio Code.

like image 515
user3213045 Avatar asked Dec 18 '22 03:12

user3213045


1 Answers

In Visual Studio you can set multiple startup projects to run/debug two projects at once:

  1. Right click on the solution in the Solution Explorer and select Properties.
  2. Under Common Properties\Startup Project select Multiple startup projects and set the Action to be Start for the two projects that you want to debug.
like image 199
bergmeister Avatar answered Feb 04 '23 15:02

bergmeister