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

VSCode中PowerShell Extension终端会话始终无法加载至提示符求助

解决VSCode PowerShell终端无限加载及移除启动项问题

修复终端无限加载的问题

  • 重装PowerShell扩展:打开VSCode扩展面板,找到PowerShell扩展,先禁用再卸载,重启VSCode后重新安装最新版。
  • 验证PowerShell路径有效性:确认系统中PowerShell可执行文件路径(比如Windows下的C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe或PowerShell 7的C:\Program Files\PowerShell\7\pwsh.exe)已加入系统PATH环境变量,能在系统终端正常启动PowerShell。
  • 手动指定终端配置:在VSCode设置中搜索terminal.integrated.profiles.windows(Linux/macOS对应替换为linux/osx),修改PowerShell的配置项,指定正确的可执行文件路径,示例配置:
    "terminal.integrated.profiles.windows": {
      "PowerShell": {
        "source": "PowerShell",
        "path": "C:\\Program Files\\PowerShell\\7\\pwsh.exe"
      }
    }
    
  • 清理扩展缓存:删除VSCode扩展缓存目录下的PowerShell扩展文件夹,Windows路径为%USERPROFILE%\.vscode\extensions\ms-vscode.PowerShell-*,删除后重启VSCode。

移除PowerShell终端自动启动项

  • 关闭扩展自动启动:在VSCode设置中搜索powershell.integratedConsole.autoStartup,将其设置为false,阻止PowerShell扩展在VSCode启动时自动加载终端。
  • 检查工作区配置:如果仅特定工作区出现自动启动,打开该工作区的.vscode/settings.json,删除或修改触发终端自动启动的相关配置。
  • 彻底禁用扩展(按需):如果不需要使用PowerShell扩展,直接在VSCode扩展面板禁用PowerShell扩展,即可完全移除相关终端会话的加载。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.25 04:56:08