Is it possible to debug multiple projects at the same time in Visual Studio?
I know you can select multiple startup projects from the solutions properties, but how are the breakpoints handled?
If two projects use the same class (two different instances of it), and I am stopped with a breakpoint in it, will it only block one program or both? How can I know which executable is hitting the breakpoint? I'm a bit confused.
Visual Studio allows you to specify how more than one project is run when you press F5 (Start with Debugging), or Ctrl+F5 (Start without debugging), or use the toolbar button to launch your application.
Setting multiple startup projects in Visual Studio is easy… 1 – Right click the solution and select 'Set Startup Projects…'. 2 – Select 'Multiple startup projects' and choose two or more projects. 3 – Press run and Visual Studio will open them in your selected browser.
To debug multiple services at the same timeOpen the folder corresponding to your first service in VS Code. In VS Code, select File > Add Folder to Workspace…, and pick the folder corresponding to your other service.
Yes, it is possible. You can set multiple startup projects in your solution (right-click solution, go to Set Startup Projects, choose Multiple startup projects), and specify the action for each project contained in the solution (None, Start, Start without debugging). If you have multiple projects set to Start, the debugger will attach to each one as it launches.
When you hit a breakpoint, you can see which process you're in using the Debug Location toolbar (you may have to show it; some profiles hide this by default). It will show which process you're currently looking at, which thread you're on, and which stack frame you're in:
I believe the default behavior is that when one process breaks, the debugger will break all of them. This way you can check the state of any attached process when you hit a single breakpoint.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With