原因:就和你搜索的一样,VSCode打不开Terminal,因为VSCode当前要打开的Terminal找不到/不存在 。
解决:设置VSCode的配置,告诉它:你默认要打开哪个Terminal程序 ,全路径是:C:\\Windows\System32\cmd.exe
Windows平台有cmd和powetshell, *nix平台有bash,zsh,csh等等。 配置想要的terminal程序的全路径即可。 配置之后重启一下VSCode。
Ctrl+Shift+P 搜索Settings 选择Open Settings (JSON)  新增以下配置:
"terminal.integrated.shell.windows": "C:\\Windows\System32\cmd.exe",
// This is deprecated, the new recommended way to configure your default shell is by creating a terminal profile in `terminal.integrated.profiles.windows#` and setting its profile name as the default in `#terminal.integrated.defaultProfile.windows`. This will currently take priority over the new profiles settings but that will change in the future.
// The path of the shell that the terminal uses on Windows. [Read more about configuring the shell](https://code.visualstudio.com/docs/editor/integrated-terminal#_configuration).
|