Define multiple tasks in VSCode

后端 未结 13 2091
旧时难觅i
旧时难觅i 2020-11-28 05:40

I have seen that it is possible to define a task in the VSCode. But I am not sure how to define multiple tasks in the tasks.json file.

13条回答
  •  鱼传尺愫
    2020-11-28 05:57

    I don't know the proper answer to this (and would also like to know), but my ugly workaround in case it helps anyone. I'm on Windows, I've ended up creating myself a simple batch script which could contain simply

    "%1" "%2"
    

    Then my tasks.json looks something like

    {
        "version": "0.1.0",
        "command": "c:\\...\\mytasks.bat"
        "tasks" : [
            {
                "taskName": "myFirstTask",
                "args": "c:\\...\\task1.exe", "${file}"],
            },
            {
                "taskName": "mySecondTask",
                "args": "c:\\...\\task2.exe", "${file}"],
            },
        ]
    }
    

提交回复
热议问题