Why is my command prompt freezing on Windows 10?

Shaun Rowan picture Shaun Rowan · Nov 24, 2015 · Viewed 51.8k times · Source

I'm adding this question after spending an entire day wrestling with this incredibly frustrating feature of the Windows 10 command prompt which made me think there was something wrong with my console application code. I hope it will help someone.

Issue: My console application seems to randomly stop running. What is going on?

Answer

Shaun Rowan picture Shaun Rowan · Nov 24, 2015

The issue ended up being a new feature of the windows 10 console. Under the default config, whenever you click on a command window in windows 10, it immediately halts the application process when it attempts to write to the console. When this happens, the command window has gone into "selection" mode.

You can tell it has happened because it will prefix the title bar of the command window with the word "Select" :

frozen command window

To get your program running again, you have to press escape or click somewhere else.

To get rid of this strange behavior, you can disable QuickEdit mode:

disable QuickEdit Mode