10

How do I stop a running gulp watch task without having to completely exit the program?

I can see the task running on the task bar bottom left with a spinning "slashes" character.

There appears to be a command "Terminate running task" (that can optionally be bound to a keyboard short-cut) - but executing this command doesn't seem to do anything and the task continues to run. Is this feature not implemented yet in the current preview version (0.1.0)?

5
  • strange, Terminate Running Task terminates the running Gulp watch task for me running on Windows 8 May 5, 2015 at 10:06
  • Terminating works for me as well. On which OS are you? May 5, 2015 at 15:09
  • I'm on Windows 8.1. Hmm .. strange.... maybe it has something to do with my gulp task? The project is a NodeJS app. The task starts up nodemon & BrowserSync before doing the watch.
    – LyphTEC
    May 6, 2015 at 4:41
  • Do you get any feedback in the Output for 'tasks' pane when selecting "Terminate Running Task" from the command palette? Can you simplify your gulp task to the bare essentials to rule out something caused by a forked process (?) or something else weird that VSC wouldn't be able to track/kill? May 30, 2015 at 2:25
  • If you are using PC, try the "pause/brake" key
    – Fabio Belz
    Mar 13, 2016 at 2:24

3 Answers 3

18

In case others run across this question, open the Command Palette (Ctrl+Shift+P on Windows, Command+Shift+P on OSX, and search for "Terminate Running Task."

2
  • Ehm, the op specifically mentioned that the Terminate Tunning Task option doesn't work for him! Or was that a later edit? Anyway I have the same issue: the Terminate Running Task doesn't stop a running Gulp (watch) task.
    – Bart
    Jan 11, 2016 at 15:35
  • "Terminate Running Task" works for me, it stopped watch gulp task. VSC v0.10.6 on Win7Pro
    – Luckylooke
    Jan 30, 2016 at 10:26
7

If you ever wonder what

search for "Terminate Running Task."

does behind the scenes: "workbench.action.tasks.terminate".

so you can just bind it, like this:

{ "key": "ctrl+shift+t", "command": "workbench.action.tasks.terminate" }
0

I was facing this issue from 2-3 months. Today I just opened tasks.json and saw hint that isWatching is deprecated instead use isBackground. I changed it and ran the task and terminated ,Voila it's working.

In short- Open tasks.json. If you see isWatching property on task change it to isBackground.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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