You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

VS Code拆分PowerShell终端报错问题求助

VS Code拆分PowerShell终端报错问题
  • 现象:默认终端设为PowerShell时,首次打开PowerShell后尝试拆分终端会触发报错;若先打开Git Bash再拆分,则可正常同时使用Git Bash和PowerShell。
  • 错误提示:""C:\Users\Austin Lee"" 不存在,可确定问题源于路径被重复添加双引号。
  • 已尝试的无效操作:
    • 在settings.json中设置terminal.integrated.cwd = "",未解决问题
    • 禁用所有VS Code扩展,问题仍存在
  • 补充背景:此前使用Oh My Posh配置PowerShell主题和终端图标时可正常拆分终端,不确定问题出现时间及是否与配置变更有关;暂未尝试卸载重装VS Code。

附settings.json配置

{
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "security.workspace.trust.untrustedFiles": "open",
  "terminal.integrated.defaultProfile.windows": "PowerShell",
  "terminal.integrated.fontFamily": "Hasklug Nerd Font",
  "editor.fontFamily": "Fira Code",
  "editor.fontLigatures": true,
  "liveServer.settings.donotVerifyTags": true,
  "git.autofetch": true,
  "editor.formatOnSave": false,
  "workbench.iconTheme": "vscode-icons",
  "prettier.semi": false,
  "typescript.preferences.quoteStyle": "double",
  "editor.bracketPairColorization.enabled": true,
  "workbench.colorTheme": "Dracula",
  "remote.SSH.remotePlatform": {
    "172.105.135.48": "linux"
  },
  "terminal.integrated.profiles.windows": {
    "PowerShell": {
      "source": "PowerShell",
      "icon": "terminal-powershell"
    },
    "Command Prompt": {
      "path": [
        "${env:windir}\\Sysnative\\cmd.exe",
        "${env:windir}\\System32\\cmd.exe"
      ],
      "args": [],
      "icon": "terminal-cmd"
    },
    "Git Bash": {
      "source": "Git Bash"
    },
    "Ubuntu (WSL)": {
      "path": "C:\\WINDOWS\\System32\\wsl.exe",
      "args": [
        "-d",
        "Ubuntu"
      ]
    },
    "Windows PowerShell": {
      "path": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
    }
  },
  "files.exclude": {
    "**/bin": true,
    "**/obj": true
  },
  "explorer.compactFolders": false,
  "[csharp]": {
    "editor.defaultFormatter": "ms-dotnettools.csharp"
  },
  "vsicons.dontShowNewVersionMessage": true,
  "editor.stickyScroll.enabled": true
}

内容的提问来源于stack exchange,提问作者Austin Lee

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.16 22:55:48