Reputation: 11335
So I'm debugging a C# program in Visual Studio, and it launches a command window for Process.Start
.
I want to keep this window open - however the method I tried - doing a Console.Readline();
didn't work.
Is there a standard way to keep a console window open so that I can see what happens when the program executes? It would be very helpful for debugging
Upvotes: 0
Views: 1588
Reputation: 1077
Since you are using Visual Studio, I am not sure if Ctrl+F5 is what you are looking for... this keeps the console active.
Upvotes: 0
Reputation: 216363
You could try with CMD.EXE and pass your program as argument
Process.Start("cmd.exe", "/K \"dir\"");
Upvotes: 1