visual-studio-code - 在 VSCode 的集成终端中运行任务?
问题描述
当我过去运行任务(tasks.json)时,它们在 VSCode 的集成终端中运行。但是,在重置我的开发机器并重新安装所有内容后,我的任务现在在新的 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 帮助
推荐阅读
- c# - 解析时间跨度 1:00 和 01:00
- c# - 从磁盘显示大量图像的最佳方法
- python - 带有 Django 项目和 MS SQL 数据库的 GitLab CI 无法登录
- php - 将原始数据传递给邮递员时出现错误
- ruby-on-rails - ruby-elasticsearch 创建带有属性的索引查询不起作用
- spring-boot - 恰好有一次生产者变慢
- python - 如何在 Python 中生成具有许多零值的随机数列表?
- c - 文件问题中的错误输出但是当我用 1 个正确的输出替换 7 时
- sql-server - OPENDATASOURCE 在@DynamicSQL 中不起作用
- python - 在使用所有身份验证的 Django 中,我想为下面提供的以下信息制作一个没有 REST 框架的自定义 API