For some reason once in a while my command prompt would hang until I press a random key, and it would continue operation as if nothing happened.


This happens when I am running a long operation (such as building/compiling some code). When it hangs, it gives no indication of what's going on nor does it prompt me to press any key.


  1. After a couple minutes, the terminal stops printing out the progress, and gets stuck.
  2. I had thought that it was simply stuck on a very lengthy portion of the compile process, but after a few hours it was still stuck on the exact same place.
  3. I pressed a random key, and it suddenly jumped straight back and continued spewing out progress indicators and continued working.

After this, similar events have happened many times during lengthy processes, such as copying files.

This has happened on multiple devices running windows 7. It has also occurred on ubuntu using bash shell.

  • 2
    Any of these machines set to sleep at all? – Windos Jul 18 '11 at 23:04
  • No, the machine doesn't go to sleep, just the terminal apparently. The machines also don't have sleep or any low power modes enabled. And have never once gone into sleep mode in their entire life time (Since I bought/built them) – Razor Storm Jul 18 '11 at 23:46
  • It sounds like you're having the same issue from two completely different environments (Linux and Windows). So you might ask what do these two things have in common? Is it the same script/code? Copying to the same server? – Nixphoe Jul 19 '11 at 1:54
  • This has happened many times over several years on completely different tasks. Some things Ive done that I remember: making a build at work, copying some files locally (robocopy on windows and cp on linux), rsync on remote servers, running batch scripts, etc – Razor Storm Jul 19 '11 at 4:45

I have experienced the same issue. Answers here and here indicate this is likely an issue with Quick Edit mode in the console. If it intercepts stray mouse clicks, or if clicks get passed erroneously through RDP, for instance, it can unintentionally pause the script. You can right-click the menubar and edit properties to turn off Quick Edit mode. That, of course, makes it more difficult to copy and paste out of the CMD window.

  • I have quick edit mode off, and experience this often in node. No issues on linux. But windows will seem to pause, until I ctr C once. This continues the node process. Seems like it would kill the process if it was truly hanging. – edencorbin Sep 5 '18 at 23:14
  • I have disabled quick edit mode so will keep an eye. My solution is to resize my cmd prompt, or power shell window a bit - to get the npm script to continue. Very strange indeed. – shanehoban Feb 28 at 23:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.