终端无法在 Visual Studio Code 中打开

Ben*_*lan 3 visual-studio-code

操作系统是Linux。

打开终端会产生此错误:

The terminal process failed to launch: Path to shell executable "bash" is not a file of a symlink.
Run Code Online (Sandbox Code Playgroud)

settings.json 和变量中的 bash 路径是正确的$PATH

这是 Visual Studio Code 版本 1.57.1​​。回滚到早期版本可以解决该问题,因此我做了一个错误报告。

小智 10

正如 jebeaudet 在评论中所说,编辑文件

~/.config/Code/User/settings.json

并添加这一行

"terminal.integrated.profiles.linux": {"bash": {"path": "/bin/bash"}},

(就我而言,从 v1.55 升级到 v1.60 时会发生这种情况)