How To Stop the Visual Studio Console Closing (Debug or Run) in a C or C++ Project

preview_player
Показать описание
That pesky Visual Studio C or C++ console window flashes onscreen and then it disappears again. How do you make it stay visible?
In fact, there are two things you need to do depending on whether you are running or debugging your project. I explain both solutions in this video.

Huw Collingbourne is author of a range of Little Programming Books on subjects such as coding in C, C#, Java, Ruby and Delphi as well as more specialist topics such as Pointers, Recursion and Programming retro adventure games in Java or C#.

To buy one of Huw’s books, go to…
…and other Amazon sites worldwide.

Code With Huw on Facebook:
Рекомендации по теме
Комментарии
Автор

i have the same problem under VS2022, while the subsystem is Console. The console appears for a couple of seconds, then vanishes. This does not happen if i launch the same program from VS2019. Under VS2019 as well, an icon on the toolbar represents the console. There is no icon on VS2022 either.

marioalday
Автор

Thank you very much dear Huw. Exactly had this problem which you solved =)

wegi
Автор

Is any method in VIsual Studio 2010 to disable "Automatically close the console when debugging stops" bcos this checkbox in this properties doesn't exist or I don't know where this checkbox exist? Simply How I can protect my consoleapp before automatically close?

wegi
Автор

Godbless you sir, just short and what I need!

breakdancerQ
Автор

Thank you very much i have been trying to run my little counting program and it keep turning off and then i found this tutorial and thank you very much!

gmodrdm
Автор

Thank you very much, you save my life.

shimul
Автор

Thank you Sir, but I'm using visual basic 2008 and the option is not there for the second issue. Please help🙏

shinobimercy