- 在vscode的setting中搜索shell
- 找到 Terminal>Intergrated>Shell:windows,点击在settings.json中编辑
- 添加如下代码 把path的路径改为你电脑中bash.exe的路径
"terminal.integrated.profiles.windows": {
"PowerShell -NoProfile": {
"source": "PowerShell",
"args": [ "-NoProfile" ] },
"Git-Bash": {
"path": "D:\\Program Files\\Git\\bin\\bash.exe",
"args": [] } },
"terminal.integrated.defaultProfile.windows": "Git-Bash",