Reputation: 3500
Problem
I have a Visual Studio 2010
solution that contains various class library
projects, 1 ASP.NET Web API
project and 2 Console Application
projects.
Now the console applications use the WebClient
class to communicate with the Web API project I have within the Solution. When I run one of the console applications, the Web API is automatically run within the VS ASP.NET WebDev Server (within Localhost). This is fine. When I set breakpoints within the Web API solution (say one of the controllers), they are not hit during debugging. Only the console breakpoints are hit. Now if I run the Web API solution directly, and use something like REST Easy FF addon to build the request, the breakpoints are hit.
Is there a option in Visual Studio 2010 to break across two different applications at once when debugging?
Technology I'm using
Upvotes: 3
Views: 2828
Reputation: 3139
I can think of several methods to cope with your question:
Tools -> Options -> Debugging
Unchecked "Enable Just My Code"
Here is what I did.
Say a project from solution A refers a project from Solution B and I want to debug into solution B project from Solution A project.
Open Solution B in Visual Studio. Set the project properties to "Use Local IIS Wb Server", set the project Url and create Virtual Directory.
Open Solution A in another Visual Studio Instance. Set the project properties to "Use Local IIS Wb Server" and Check "Use IIS Express", set the project Url and create Virtual Directory.
Press F5 and start debugging Solution B instance of Visual Studio. Then Press F5 and start debugging Solution A instance of Visual Studio. Now both the instances of Visual Studio will be in debug mode. Start from Solution A now and you should be able to debug into Solution B just like if both projects were in the same solution.
The key here is to "Use IIS express" for one and "Local IIS Web server" for the other project. This will let you have two debuggers running at once.
Source: https://stackoverflow.com/a/25630033/3125120
I hope it helps.
Upvotes: 2