在Vscode几个版本的更新之后,为编辑器使用新的shell方法已经变更
老版本:terminal.integrated.shell.windows: “/*path*/”
新版本:在seeting.json中添加
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"path", //把path改为你的shell路径
"${env:windir}\\System32\\cmd.exe"
],
"args": [],
"icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash"
}
},
注:terminal.integrated.profiles.windows下的Command Prompt和 terminal.integrated.defaultprofiles.windows 的名称应相同;如下图所示: