【问题标题】:Cannot set default terminal to PowerShell 6.0无法将默认终端设置为 PowerShell 6.0
【发布时间】:2017-12-02 21:50:19
【问题描述】:

我正在尝试将 vscode 中的默认终端设置为 PowerShell 6.0。但是重启vscode后,出现如下提示,终端没有启动。

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

【问题讨论】:

  • 不知道是否支持?
  • 我不知道存在支持问题。 shell 只是一个可执行文件:cmd.exe、powershell.exe、bash.exe 等......
  • @TheIncorrigible1 - 没有“支持”的问题。我使用了错误的项目来设置它。请参阅下面的答案。

标签: powershell visual-studio-code vscode-settings powershell-v6.0


【解决方案1】:

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

这行得通。

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

【讨论】:

    【解决方案2】:

    截至 2019 年 8 月 26 日,路径为:

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

    【讨论】:

      猜你喜欢
      • 2021-12-07
      • 2013-07-06
      • 2013-05-24
      • 1970-01-01
      • 2017-04-20
      • 2017-12-20
      • 2019-02-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多