Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode - Can a task call another task?

Vscode Version: 1.19.3

I was wondering if there was a way for one task to call another, like the "preLaunchtask" but for regular tasks.

The reason is because when I want debug my code, I need to recompile my executable to the latest version so I have the "preLaunchTask" call the CMakeTask which then needs to call make, to make my executable.

like image 913
Trevin Corkery Avatar asked Jan 26 '18 15:01

Trevin Corkery


1 Answers

You can make it depends on another task. Example:

    {
        "label": "secondTask",
        "type": "shell",
        "command": "<Your second task's command here>",
        "dependsOn": [
            "firstTask"
        ]
    },
    {
        "label": "firstTask",
        "type": "shell",
        "command": "<Your first task's command here>"
    }
like image 143
Ali Karaca Avatar answered Sep 20 '22 08:09

Ali Karaca