Multiple commands/tasks with Visual Studio Code

后端 未结 5 1917
清歌不尽
清歌不尽 2020-12-05 00:31

I have a local folder that I use as a scratch pad for multiple little sample and toy pieces of code. I store a host of python, C++, shell scripts etc. in this directory.

5条回答
  •  臣服心动
    2020-12-05 01:05

    You could write and run a custom script file instead of python etc. directly. In the script file you would extract the file extension in order to call python, clang or whatever the compiler/translator neededmay be.

    So your task file would look like this;

    // A task runner that runs a program
    {
       "version": "0.1.0",
       "command": "${workspaceRoot}\\runProgram.sh"
       "args": ["${file}"]
    }
    

提交回复
热议问题