过去运行任务(tasks.json)时,它们在VSCode中的Integrated Terminal中运行。但是,在重置开发机器并重新安装所有内容之后,我的任务现在在新的cmd窗口中运行。当任务失败并出现错误时,这是一个问题。在这种情况下,cmd窗口只是关闭,我看不到实际错误是什么。
我如何让任务再次在集成终端中运行?
ITNOA
如果您在版本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 help