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