Close the console window when debugging stops in Visual Studio

Visual Studio by default will keep a console app open after debugging. A lot of the time after debugging console apps we want to look at the output so this is ideal.

If your console app just does setup work like inserting test DB records or you otherwise just want it to close immediately CHECK the ‘Automatically close the console when debugging stops’ checkbox on the Tools -> Options -> Debugging menu GUI.

Close console after debugging finishes

Of course the funny thing is that Visual Studio tells you how to do this in the console window whenever the checkbox is not checked but sometimes we just zone out and don’t look properly.

 

Leave a Reply

Your email address will not be published.