I started facing this issue suddenly after vscode upgrades and resolved the issue by following approach.
Follow these instruction one by one until it resolves the issue. You may have to restart your vscode multiple times during the process.
- Upgrade vscode
$SHELLto correct shell path
Find which shell you have,
echo $SHELLmine is
/bin/zshafter that I checked where my zsh shell is installed
## Find shell echo $SHELL ## Check where zsh is installed or working from which zsh
/usr/local/bin/zsh after that I updated my SHELL to correct zsh
## Filename: ~/.zshrc export SHELL=/usr/local/bin/zsh
- Update vscode terminal shell profile
Open settings and scroll down in terminal section and set to your shell.
- Restart vscode in verbose mode to check for further details
code --verbose --log debug
see if anything is unusual and share those logs here