You could try with CMD.EXE and pass your program as argument
Process.Start("cmd.exe", "/K \"dir\"");
Вопрос
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
Решение
You could try with CMD.EXE and pass your program as argument
Process.Start("cmd.exe", "/K \"dir\"");
Другие советы
Since you are using Visual Studio, I am not sure if Ctrl+F5 is what you are looking for... this keeps the console active.