374

I created a solution in Visual C# 2010 Express that contains two projects: one is the client, the other is the server. I would like to debug both at the same time, but I can only seem to run one of the projects during debugging.

Is there a way to run both at once?

Tom Stickel
  • 19,633
  • 6
  • 111
  • 113

2 Answers2

657

Go to Solution properties → Common PropertiesStartup Project and select Multiple startup projects.

Solution properties dialog

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Max
  • 19,654
  • 13
  • 84
  • 122
  • 63
    BTW. Projects can also be started for debugging from Solution Explorer. In Solution Explorer right click on the project, then Debug-> Start new Instance. So with one instance of VS one can debug loads of instances at once. – Max Oct 08 '10 at 10:13
  • 1
    @Max - In the express editions. "In Solution Explorer right click on the project, then Debug-> Start new Instance.", doesn't work, but your original answer does. FWIW – dbasnett Sep 25 '13 at 14:28
  • 2
    Works in VS 2015 CE as well. – Payton Byrd Nov 30 '15 at 03:36
  • 2
    Can't get this to work for web projects in VS 2015 update 2 & 3 – Frode Nilsen Aug 09 '16 at 07:44
  • the mentioned menu is seen for MVC or even DLL projects but not for web site projects. – mustafa öztürk Sep 22 '17 at 08:12
150

Max has the best solution for when you always want to start both projects, but you can also right click a project and choose menu DebugStart New Instance.

This is an option when you only occasionally need to start the second project or when you need to delay the start of the second project (maybe the server needs to get up and running before the client tries to connect, or something).

isherwood
  • 58,414
  • 16
  • 114
  • 157
Kevin
  • 8,353
  • 3
  • 37
  • 33
  • 11
    As Kevin said using Debug > Start New Instance. can be helpful for to start project at demand, but an other interesting use is to start 2 (or more) instances of the same project. can debug 1 server and 2 clients by example. – Exatex Jan 02 '14 at 14:56