Vag*_*tAI 5 windows visual-studio-code vscode-tasks
是否可以通过外部终端启动 bat 文件,而不是在 vscode 终端内?
任务示例:
{
"label": "Build",
"type": "shell",
"command": "./build.bat",
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
}
Run Code Online (Sandbox Code Playgroud)
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
}
},
Run Code Online (Sandbox Code Playgroud)
对于较旧的tasks.json版本:因此,虽然vscode使用PowerShell作为Windows上的主要环境,但下一部分对我有用:
"command": "Start-Process -FilePath \"path to script\"",
"presentation": {
"reveal": "never"
},
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3239 次 |
| 最近记录: |