-
Notifications
You must be signed in to change notification settings - Fork 29.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Terminal - Windows] Ctrl+c doesn't work #28635
Comments
This has been a long standing issue I believe related to winpty. Currently tracked upstream in microsoft/node-pty#7 @rprichard could this have something to do with the processes not dying when ctrl+c is pressed, similar to #26807? |
No, those two issues aren't likely to be related. It could be related to this upstream winpty issue, rprichard/winpty#116. For now, I'm considering it a limitation. The master branch in winpty has a change that improved Ctrl-C handling in new versions of PowerShell (e.g. Windows 10, not Windows 7). Maybe it'd also improve node.js? However, I just tested winpty+node, and it worked fine, even with old versions of winpty. When I hit Ctrl-C, I see the message prompting me to hit Ctrl-C again, and when I do, it exits. It also worked fine in VS Code. I'm using Win 10.0.15063.332 (Creators Update) and node v6.10.3. I first tested in Cygwin64's mintty running winpty 0.4.2, 0.4.3, and master. I then tested with VS Code 1.12.2. VSCode updated itself to 1.13.0 today, and that also worked fine. My VSCode's Here's what I see in VSCode when I type:
Maybe report your |
I installed node 8.1.0, and it also worked fine. In Cygwin64's mintty:
It also worked fine in VSCode. |
I am using node 7.0.0, and the standard cmd.exe (no powershell or bash but I have the same problem from vscode/bash). I also have the same problem if I unset the Edit: just to be sure, I updated to node 8.1.0 and am getting the same problem. |
@rprichard it seems to happen about 50% of the time to me.. |
Could it be that this is fixed with the Creator's Update? I am on Anniversary Update and have this problem. |
@Tyriar Something interesting: I downloaded VSCode 1.13.1 (public stable build) and ctrl+c works as expected. |
Is there a workaround for now to kill a running task in the terminal (without killing the whole terminal)? FWIW, I am also only having the issue in the insiders build -- in 1.13.1 |
@eamodio I'm not aware of a workaround. |
Solution for my problem:
now terminating of batch job in terminal works via CTRL + C for me |
@tonoslav bingo, you found the bug! I actually fixed this yesterday in Insiders 😄, here's the root cause: xtermjs/xterm.js#724 |
Hrm |
@mikemaccana I doubt you're experiencing this issue. Also |
Steps to Reproduce:
ctrl + c
(several times)What happens?
Nothing
What should happen?
The first time
ctrl + c
is pressed, nodejs should print out(To exit, press ^C again or type .exit)
and the second time it is pressed, it should exit nodejs.Note that it works fine with a standard (external) cmd prompt.
Here is my settings.json file:
The text was updated successfully, but these errors were encountered: