Reputation: 11
Is there any other way to not close the terminal window in Visual Studio when running in debug mode? I know I can "cin >> trash;" to make it wait for input, and that I could put a breakpoint in, but are these the only two ways? It seems like there should be a setting in the debug compiler settings, but I could find anything on it. Does anyone know?
Upvotes: 1
Views: 258
Reputation: 161831
The simple solution is to do it yourself:
public void Main(){
try {
// Do your thing
}
catch (Exception ex) {
Console.WriteLine(ex);
}
finally {
Console.Write("ENTER to exit: ");
Console.ReadLine();
}
}
Upvotes: 1