19

I am launching a task and it works great but its a task that stays running in the current shell. Is there anyway to kill this task from the editor when you are done?

Gama11
  • 31,714
  • 9
  • 78
  • 100
Dan Vega
  • 1,097
  • 1
  • 14
  • 23
  • http://stackoverflow.com/questions/33885264/how-to-set-a-keyboard-shortcut-to-terminate-running-task-in-vscode – MKYuones Oct 16 '16 at 09:19
  • Yeah debugger is annoying for me when it spawns. For a server I use lsof -i tcp:3333 (or whatever the port is) and then kill -9 PID – Mark Robson Nov 16 '18 at 11:16

5 Answers5

7

Try Ctrl+Shift+P, start typing term and the command palette will highlight "terminate running task", press Enter and you're done

jonayreyes
  • 538
  • 1
  • 10
  • 27
6

Not sure if you have tried.

  1. Press Ctrl+P.
  2. Type >task terminate.
qxg
  • 6,955
  • 1
  • 28
  • 36
  • 4
    Typing `>` in [Quick Open](https://code.visualstudio.com/docs/editor/codebasics#_explorer) `Ctrl+P` is the equivalent of [Command Palette](https://code.visualstudio.com/docs/editor/codebasics#_command-palette) `Ctrl+Shift+P` (for others like me who missed typing `>`) – Jeremy Larter Oct 01 '16 at 00:09
3

In the task Runner Explorer window, you'll see a tab that has "(running)" in it's title. Click the X to close the tab, and visual studio will ask you if you want to terminate the task. If you chose to terminate it, the tab will disappear.

Mark At Ramp51
  • 5,343
  • 1
  • 25
  • 30
2

To kill a C++ Code Runner task, press Ctrl + Alt + M.

Peter Chaula
  • 3,456
  • 2
  • 28
  • 32
2

enter image description here

You can end the task using the bin button!

Lakpriya Senevirathna
  • 2,488
  • 2
  • 17
  • 35