how to stop a command in the VS Code terminal
You can terminate with the Trash icon like you do,
or press Control + C
. That's the shortcut from the default Terminal app and it also works in VS Code.
Hope this helps! ✌
In certain cases, such as running a Node server, Ctrl-C wouldn't work. Instead, you can stop the app or command by pressing Ctrl+Alt+M (i.e. Ctrl+Option+M for mac users).
Sample JavaScript code to demonstrate this:
const http = require('http');
http.createServer((req, res) => {
res.write('Hello, world!');
res.end();
}).listen(5000, () => console.log('Server running...'));
ctrl + c
works in terminal but didn't work for me in vs code. However hitting q
did ( when running a git diff
for example)