This setting breaks my terminal window (because PowerShell is blocked due company administrative policy):

Afterwards, I could not open the terminal again.
Restore CMD as default
- open File > Preferences > Settings (CTRL+,)
- search for
terminal.integrated.defaultProfile.windowsand set a default (for me Command Prompt)

Now the terminal should open again. This is not a fix to get PowerShell working in Visual Studio Code, just a guide to restore the terminal window.
Answer from tom on Stack OverflowThis setting breaks my terminal window (because PowerShell is blocked due company administrative policy):

Afterwards, I could not open the terminal again.
Restore CMD as default
- open File > Preferences > Settings (CTRL+,)
- search for
terminal.integrated.defaultProfile.windowsand set a default (for me Command Prompt)

Now the terminal should open again. This is not a fix to get PowerShell working in Visual Studio Code, just a guide to restore the terminal window.
It appears that you're trying to get PowerShell in a Visual Studio Code integrated terminal.
Let me share the process of how I did it.
- Open Visual Studio Code
- Go to menu File → Preferences → Settings
- Type "Terminal" in the search bar
- Under Features, click on "terminal"
- Scroll down until you find a section like this and make sure the option is empty (this sets a default starting directory):
Terminal › Integrated: Cwd
An explicit start path where the terminal will be launched, this is used as the current working directory (cwd) for the shell process.
This may be particularly useful in workspace settings if the root directory is not a convenient cwd.
- Scroll down until you find this other option
Terminal › Integrated › Shell: Windows
The path of the shell that the terminal uses on Windows (default:
Click on edit settings.json
Paste your terminal absolute path within the brackets (make sure you escape the slashes). That's the reason of why I'm using double
"terminal.integrated.shell.windows": "C:\\InstallationDirectory\\PowerShell\\7\\pwsh.exe"
The terminal process failed to launch: Path to shell executable "c:\<my project>\platformio.exe" does not exist
The terminal process failed to launch: Path to shell executable "Git Bash" does not exist.
visual studio code - VSCode Error: The terminal process failed to launch: Path to shell executable "/usr/bin/tmux" does not exist - Stack Overflow
Visual Studio Code error "path to shell executable does not exist"
I solved this issue by changing by default shell for vs-code with following steps:
- Open settings-search in VSCode with
Cntr + Shift + p - Search for
default - clicked
Terminal: Select Default Shell - clicked
zsh /usr/bin/zsh, I selected zsh as I recently installed it and like to use it, you can use other terminal options as well.
Thank you.
I had the same issue. I resolved it by changing the path of "terminal.integrated.shell.linux" in the settings.json file. Link : https://code.visualstudio.com/docs/supporting/troubleshoot-terminal-launch