Search code examples
windowspowershellvisual-studio-codeterminal

VS Code: "Shell Integration Failed To Activate"


When I hover on my VS Code terminal name (in the terminal's upper right corner named "Powershell"), it shows:

shell integration failed to activate

How to solve this error?

I tried re-installing VS Code again, but still no change. I also installed powershell 7.


Solution

  • There are a few potential solutions for this issue.

    • Make sure that you have the latest version of VS Code and the Shell Integrate extension installed.

    • Check that the integrated terminal in VS Code is set to the shell you want to use (e.g. PowerShell, Command Prompt, Bash).

    • Try running VS Code as an administrator.

    • If you are using Windows, try adding the path of the shell you want to use (e.g. C:\Windows\System32\bash.exe) to the "terminal.integrated.shell.windows" setting in your VS Code settings.

    • You can also try reinstalling VS Code and your extensions.

    If none of the above solutions work, you can try searching for specific error messages in the output panel of VS Code or in the output of the terminal.