VS Code拆分PowerShell终端报错问题求助
VS Code拆分PowerShell终端报错问题
- 现象:默认终端设为PowerShell时,首次打开PowerShell后尝试拆分终端会触发报错;若先打开Git Bash再拆分,则可正常同时使用Git Bash和PowerShell。
- 错误提示:
""C:\Users\Austin Lee"" 不存在,可确定问题源于路径被重复添加双引号。 - 已尝试的无效操作:
- 在settings.json中设置
terminal.integrated.cwd = "",未解决问题 - 禁用所有VS Code扩展,问题仍存在
- 在settings.json中设置
- 补充背景:此前使用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
相关产品推荐
相关产品推荐

