Reputation: 31
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
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:
If this isn't what you're looking for, please provide additional details
Upvotes: 1