Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging two projects in two instances of Visual Studio at the same time

When I try to open two projects in two different instances of Visual Studio and run both of them locally in debug mode at the same time (say, a web application and the backend WebService that it uses) I get the error "Unable to start debugging on the web server. A debugger is already attached"

No one else in the office is able to do it either, except for one person, who can't figure out why it only works for him. The virtual directories in my computer's IIS seem to be set up the same way as his (I don't know about the settings).

I was also able to debug from two instances of VS at once at my previous job, so something about the setup here must be different.

like image 919
Hypersapien Avatar asked Oct 16 '15 17:10

Hypersapien


1 Answers

I figured it out. Each project needs to be set to a different Application Pool. Found the answer here.

Since the same AppPool was being used by both the Web Application and Web Service, the same process hosted both. That is why as I had already attached the process in one instance of Visual Studio, I could not attach it in the second instance of Visual Studio.

Changing the AppPool had the effect of both being hosted in different host processes and hence they could now be debugged using different instances of Visual Studio.

like image 149
Hypersapien Avatar answered Sep 30 '22 11:09

Hypersapien