相关疑难解决方法(0)

如何从Visual Studio Code集成终端在Windows上使用Bash?

Windows上的Visual Studio代码默认使用PowerShell作为集成终端.如果要使用Visual Studio Code中的Bash,应遵循哪些步骤?

git-bash visual-studio-code vscode-settings

230
推荐指数
15
解决办法
22万
查看次数

如何更改 VS Code 中的默认终端

每当我在 VS Code 中打开终端时,它总是会打开默认终端,而且我总是必须手动更改它。

在此输入图像描述

这真的很烦人,因为我每天都在使用终端。我检查了Terminal工具栏中的设置,但找不到更改默认值的选项。我们怎样才能做到呢?

terminal visual-studio-code

27
推荐指数
3
解决办法
2万
查看次数

GitBash 未在 Visual Studio Code 中显示为终端选项

我试图在 Visual Studio Code 中插入 GitBash 作为一个选项。我的设置如下所示:

"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"
    },
    "GitBash": {
      "source": "GitBash",
      "path": ["F:\\Code\\Git\\bin\\bash.exe"],
      "icon": "terminal-bash"
    }
  },
  "terminal.integrated.defaultProfile.windows": "GitBash"
Run Code Online (Sandbox Code Playgroud)

但是,在最后一行,Visual Studio Code 给出的错误是:

Value is not accepted. Valid values: "PowerShell", "Command Prompt".(1)
The default profile used on Windows. This setting will currently be ignored if either #terminal.integrated.shell.windows# or #terminal.integrated.shellArgs.windows# are set.
Run Code Online (Sandbox Code Playgroud)

我不明白我哪里出错了。

注意:"terminal.integrated.shell.windows"自 2021 年 4 …

terminal git-bash visual-studio-code

8
推荐指数
5
解决办法
1259
查看次数