I am trying to migrate to VSCode and having a problem with setting-up tasks. It is easy to define tasks in tasks.json but I would like to run several tasks simultaneously (which I can't).
Here is my use-case: I have two watchers in my project (one for gulp and another one for webpack). Plus I want to be able to run webpack task separately. When I run one of the watchers I cannot run anything else - VSCode requires me to terminate the running task at first.
In Visual Studio I used Task Runner where several tasks were running simultaneously. Is it possible to achieve the same in VSCode?
You can have multiple windows open and they'll each have their own terminal. Or run one in the vscode terminal and one in a regular terminal window. cd project/python && python3 project.py & cd project/node && node . The above runs a python and nodejs project from 1 command.
Tip: You can run your task through Quick Open (Ctrl+P) by typing 'task', Space and the command name. In this case, 'task lint'.
Using compound tasks, you can specify dependsOn
and dependsOrder
on a separate task, and run them in parallel like this:
{
"label": "start-tasks",
"dependsOrder": "parallel",
"dependsOn": [
"taskOne",
"taskTwo"
]
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With