Ctrl+C does not stop node server in Command Line from VS Code

后端 未结 4 1232
忘了有多久
忘了有多久 2020-12-19 07:41

From a normal Windows command prompt, ctrl+c will stop a node server running.

However, if I start the command prompt via the VS Code menu item Op

相关标签:
4条回答
  • 2020-12-19 08:21

    In VS Code you will see a pull-down menu at the top of the terminal in the right corner. If you are in a running node app and want to close it or you are "stuck" the pull-down menu should say node. Click the trashcan (kill terminal) next to the list to close the running node app. You should be returned to the terminal unless you have something else running like another node app. Select bash, powershell, etc from the pull-down menu to navigate back to your command line.

    0 讨论(0)
  • 2020-12-19 08:22

    I had the same problem as OP, and RaelB's answer didn't help.

    What I did was "disallowed chords" by going to the User Settings (Ctrl + Alt + S on Windows) > User Tab (not Workspace tab) > Features > Terminal and unchecked the Integrated: Allow Chords checkbox.

    Now I can use my terminal as I would use a regular Windows terminal.

    Here's an image of the settings:

    0 讨论(0)
  • 2020-12-19 08:24

    If you use Code Runner Visual Code Extension use Ctrl + Alt + M.

    0 讨论(0)
  • 2020-12-19 08:43

    Adding this setting solves the problem:

    "terminal.external.windowsExec": "C:\\Windows\\sysnative\\cmd.exe"
    

    Sounds like this will be fixed in future versions. (See Link to Github Issue)

    0 讨论(0)
提交回复
热议问题