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

VS Code已配置Git Bash为默认终端,AugmentCode仍用PowerShell执行命令

问题描述

我已将VS Code默认终端配置为Git Bash,但当AugmentCode执行Flutter命令或任务时,仍使用PowerShell。

已完成的配置操作

  1. 设置Git Bash为默认终端配置文件:
"terminal.integrated.defaultProfile.windows": "Git Bash"
  1. 配置终端配置文件:
"terminal.integrated.profiles.windows": {
  "Git Bash": {
    "path": "C:\\Program Files\\Git\\bin\\bash.exe",
    "args": []
  }
}
  1. 设置自动化配置文件使用Git Bash:
"terminal.integrated.automationProfile.windows": {
  "path": "C:\\Program Files\\Git\\bin\\bash.exe",
  "args": []
}

当前现象

  • 手动打开终端(Ctrl+`)时,Git Bash可正常启动
  • AugmentCode执行命令时,VS Code仍使用PowerShell

环境信息

  • Windows 11
  • VS Code版本:1.101.0
  • Git Bash已正确安装并可用
  • 已安装Flutter/Dart扩展

我已多次重启VS Code,但问题仍存在。请问我遗漏了什么设置?是否有其他配置覆盖了当前设置?


可能的解决方法
  1. 检查Flutter/Dart扩展的终端配置
    打开VS Code设置,搜索dart.flutterRunTerminal,将其值改为git-bash(或你配置的Git Bash终端名称),强制Flutter命令使用指定终端。

  2. 排查任务配置(tasks.json)
    如果AugmentCode通过VS Code任务执行命令,查看项目根目录下的.vscode/tasks.json,检查是否有options.shell配置强制指定了PowerShell。若有,修改为Git Bash的路径:

"options": {
  "shell": {
    "executable": "C:\\Program Files\\Git\\bin\\bash.exe",
    "args": []
  }
}
  1. 检查AugmentCode专属配置
    在VS Code设置中搜索augmentcode相关关键词,查看插件是否自带终端类型配置项,若有则将其切换为Git Bash。

  2. 验证工作区配置是否覆盖全局设置
    打开命令面板(Ctrl+Shift+P),选择「Preferences: Open Workspace Settings」,检查是否存在终端相关配置覆盖了全局设置,若有则修改或删除该配置。

  3. 尝试指定默认shell路径(兼容旧逻辑)
    尽管terminal.integrated.shell.windows在新版VS Code中已标记为过时,但部分插件可能仍依赖该配置。在全局设置中添加:

"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.12 20:35:08