1

我试图将vscode中的默认终端设置为PowerShell 6.0。但是,重新启动vscode后,会显示以下消息,并且终端未启动。无法将默认终端设置为PowerShell 6.0

ERROR e.executable.toLowerCase is not a function 

这里是我尝试过使用的用户设置覆盖代码。注:反斜杠路径分隔符必须转义。

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" 
    } 
} 
+0

你知道它是否支持吗? – TheIncorrigible1

+0

我不知道有支持问题。 shell只是一个可执行文件:cmd.exe,powershell.exe,bash.exe等... – lit

+0

@ TheIncorrigible1 - 没有“支持”的问题。我正在使用错误的项目来设置它。见下面的答案。 – lit

回答

2

"terminal.integrated.env.windows"不是正确的使用属性。

This Works。

{ 
    "window.zoomLevel": 1, 
    "terminal.integrated.shell.windows": "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" 
}