<t>Starting from Visual Studio 2017 (15.9.4) there is an option:<br/>
<br/>
Tools->Options->Debugging->Automatically close the console<br/>
<br/>
```<br/>
<br/>
The corresponding fragment from the [Visual Studio documentation](https://learn.microsoft.com/en-us/visualstudio/debugger/general-debugging-options-dialog-box?f1url=https%3A%2F%2Fmsdn.microsoft.com%2Fquery%2Fdev15.query%3FappId%3DDev15IDEF1%26l%3DEN-US%26k%3Dk(VS.ToolsOptionsPages.Debugger.General)%26rd%3Dtrue%26f%3D255%26MSPPError%3D-2147217396&view=vs-2017):<br/>
<br/>
**Automatically close the console when debugging stops:**<br/>
<br/>
Tells Visual Studio to close the console at the end of a debugging session.</t>