当我过去运行任务 (tasks.json) 时,它们在 VSCode 的集成终端内运行。但是,在重置我的开发计算机并重新安装所有内容后,我的任务现在在新的 cmd 窗口中运行。当任务因错误而失败时,就会出现问题。在这种情况下,cmd 窗口刚刚关闭,我无法读取实际的错误是什么。
如何让任务再次在集成终端中运行?
如果您使用的是版本 2 的 task.json
你只需要写presentation
财产在tasks
像下面这样:
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "shared",
"showReuseMessage": true,
"clear": false
}
完整的例子如下
"tasks": [
{
"label": "example",
"type": "shell",
"command": "foo",
"args": [],
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "shared",
"showReuseMessage": true,
"clear": false
}
}
]
欲了解更多信息,您可以阅读vscode task.json 帮助 https://code.visualstudio.com/docs/editor/tasks
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)