2

How can I run multiple copies of the same app in Debug with Visual Studio? For instance, how do I run app.exe /option1 and app.exe /option2 and still debug both? I know I can run them manually and then attach, but I want an automated solution.

I have tried writing a small console app just to run 2 processes, but obviously they are not being run under debugger. Any ideas?

Egor Pavlikhin
  • 17,503
  • 16
  • 61
  • 99
  • Why do you need that? It's a little bit strange to debug TWO applications at once. – Vladislav Rastrusny Jun 03 '10 at 07:07
  • Why? I am debugging a service that is going to run on 2 separate machines. – Egor Pavlikhin Jun 03 '10 at 07:17
  • possible duplicate of [Run multiple instances with one click in Visual Studio](http://stackoverflow.com/questions/5498911/run-multiple-instances-with-one-click-in-visual-studio) - that one is newer, therefore it should be duplicate of this, but as it actually contains an answer, I would rather close this one. – Suma Nov 30 '12 at 11:37
  • This is IMHO a perfectly valid need. The particular case I'm in: I happen to debug a program which is intended to be run two instances, one with command-line argument HOST, the other with command-line argument GUEST. – Stéphane Gourichon Nov 17 '16 at 09:36

2 Answers2

1

I ended up creating a separate project and calling application's Program.Main() from there :)

Egor Pavlikhin
  • 17,503
  • 16
  • 61
  • 99
0

The debugger sometimes seems to lock out other apps a bit so I'd be wary of running two debugging instances at the same time on the same machine in case they affect each other. Instead, unless the apps need to run on the same machine, I'd suggest installing some kind of VM software and then running each debugger in a separate Virtual Machine or similar.

Hans Olsson
  • 54,199
  • 15
  • 94
  • 116