Cannot set default terminal to PowerShell 6.0

1.3k Views Asked by At

I am trying to set the default terminal in vscode to PowerShell 6.0. However, after restarting vscode, the following message appears and a terminal is not started.

ERROR  e.executable.toLowerCase is not a function

Here is the user settings override code I have tried using. NOTE: backslash path separators must be escaped.

vscode 1.18.1
PSVersion 6.0.0-rc
"C:\Program Files\PowerShell\6.0.0-rc\pwsh.exe"

{
    "window.zoomLevel": 1,
    "terminal.integrated.shell.windows": {
        "C:\\Program Files\\PowerShell\\6.0.0-rc\\pwsh.exe"
    }
}
2

There are 2 best solutions below

0
On BEST ANSWER

"terminal.integrated.env.windows" is not the correct property to use.

This works.

{
    "window.zoomLevel": 1,
    "terminal.integrated.shell.windows": "C:\\Program Files\\PowerShell\\6.0.0-rc\\pwsh.exe"
}

This also works.

{
    "window.zoomLevel": 1,
    "terminal.integrated.shell.windows":
        "C:/Program Files/PowerShell/6.0.0-rc/pwsh.exe"
}
0
On

As of 8/26/2019, the path is:

{
    "window.zoomLevel": 1,
    "terminal.integrated.shell.windows": "C:/Program Files/PowerShell/6/pwsh.exe"
}