Debug Multiple Projects at the Same Time in Visual Studio

Paul Nieuwelaar, 07 April 2015

Usually when we need to debug something in Visual Studio, it's one project that we're launching, so we can simply set our project as the startup project by right clicking the project, and selecting set as startup project.

In some cases however, we need to be debugging 2 or more projects at the same time. For example, if we have an MVC website which needs to call our API, we would need to have both projects running at once.

Fortunately we can do this quite easily in Visual Studio. Simply right click the Solution, and select Properties.

In the properties window, under Common Properties, select Startup Project. From here we can select the Multiple startup projects option, and then go through and select which projects should launch. You can also choose whether each project runs in debug mode or not.

When you start debugging now, whichever projects you set to start will launch simultaneously. This will allow you to test a website and API etc without having to deploy anywhere, and will allow you to debug completely from within visual studio.