如何在 VSCode 中为工作区设置不同的默认终端

问题描述

在 VS Code 2021 年 4 月更新之前,可以在用户设置中设置认终端,然后在需要不同终端的项目的工作区设置中覆盖它,如下所示:

用户设置:

"terminal.integrated.shell.windows": "C:\\Windows\\System32\\wsl.exe"

工作区设置:

"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe"

既然 terminal.integrated.shell 已被弃用,这些设置将如何迁移?

我可以在用户设置中使用以下内容将 WSL 设置为认值:

"terminal.integrated.defaultProfile.windows": "Ubuntu (WSL)"

...但是 terminal.integrated.defaultProfile 不能在工作区设置中设置,所以我不能用它来覆盖不同终端的设置。

terminal.integrated.automationShell 可用于工作区设置以覆盖用于自动化的终端(例如 npm 脚本),但不能覆盖手动启动的终端。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)