通过任务 2.0.0 在外部终端启动 vscode 任务
Launch vscode task in external terminal via tasks 2.0.0
是否可以通过外部终端启动 bat 文件,而不是在 vscode 终端内?
任务示例:
{
"label": "Build",
"type": "shell",
"command": "./build.bat",
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
}
tasks.json 版本 2.0.0 编辑:
{
"label": "%name%",
"type": "shell",
"command": "Start-Process -FilePath \"%path to bat%\"",
"presentation": {
"reveal": "never"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
旧 tasks.json 版本:
因此,虽然 vscode 在 windows 上使用 PowerShell 作为主要环境,但下一篇对我有用:
"command": "Start-Process -FilePath \"path to script\"",
"presentation": {
"reveal": "never"
},
是否可以通过外部终端启动 bat 文件,而不是在 vscode 终端内?
任务示例:
{
"label": "Build",
"type": "shell",
"command": "./build.bat",
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
}
tasks.json 版本 2.0.0 编辑:
{
"label": "%name%",
"type": "shell",
"command": "Start-Process -FilePath \"%path to bat%\"",
"presentation": {
"reveal": "never"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
旧 tasks.json 版本: 因此,虽然 vscode 在 windows 上使用 PowerShell 作为主要环境,但下一篇对我有用:
"command": "Start-Process -FilePath \"path to script\"",
"presentation": {
"reveal": "never"
},