vscode版本:版本: 1.57.1 (user setup)
vscode默认终端是powershell,现更换为cmd
在 setting.json(可通过 ctrl + P 搜索)
之前的命令是
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe"
但提示:详细了解如何配置 shell
此项已弃用,配置默认 shell 的新推荐方法是在 #terminal.integrated.profiles.windows#
中创建一个终端配置文件,并将其配置文件名称设置为 #terminal.integrated.defaultProfile.windows#
中的默认值。此操作当前将优先于新的配置文件设置,但将来会发生更改
现在使用以下命令:
"terminal.integrated.profiles.windows": {
"my-cmd": {
"path": "C:\\Windows\\System32\\cmd.exe",
"args": []
}
},
"terminal.integrated.defaultProfile.windows": "my-cmd"
然后重启 vscode 即可