C H
C H

Reputation: 31

How to debug multiple projects within a Visual Studio 2010 solution

I know that I can attach a currently executing process during a debug session. However, I have not found yet how to debug a process that is launched from the Startup project. I have this process being launched with a few parameters, and I would like to step in its initialization, and verify that the arguments that are being passed are correct. In other words, I would like to step into the startup process, and then, after the new process is launched make that the debugger stops in its first breakpoint.

Can someone show me how to configure this scenario using Visual Studio 2010?

Thanks!

Upvotes: 0

Views: 228

Answers (1)

Grady G Cooper
Grady G Cooper

Reputation: 1064

Your question isn't completely clear...but, one way is to insert; System.Diagnostics.Debugger.Break();

namespace ConsoleApplication1 { class Program { static void Main(string[] args) { System.Diagnostics.Debugger.Break(); } } }

A screen will pop-up and you can attach debugger:

Pop-up

  1. Click Debug
  2. Select instance of VS2010 you'd like to use (for example, use the one that has your solution open).

If this isn't what you're looking for, please provide additional details

Upvotes: 1

Related Questions