How do you “Attach to Process…” for a console application thats running from a CMD window and not launched by F5? The reason I ask is because the application takes command line arguments and I want to have a genuine experience.
I’ve even attaching to CMD.exe, but no luck, or setting a break-point using Console.ReadKey() with also no luck. I’m kind of at a loss here.
Is this possible?
You have some options:
Debugger.Launch()orDebugger.Break()into your code – with this executed, the system will launch a dialog asking you to choose what instance of Visual Studio to use for debugging (you can choose the one with your project already open).