如何解决Windows 1903中经过验证的错误并启动VSCode集成终端?

时间:2019-05-15 17:41:22

标签: visual-studio-code windows-10

我刚刚重新安装了Windows 10 Pro 1903版本内部版本18362.116和Visual Studio Code。现在,集成终端仅在外部启动。

Ctrl + ~会得到此结果。

vscode non-integrated terminal

我想念什么?如何使其重新打开集成?


编辑

与VSCode团队合作后,这是一个经过验证的错误。 See the Github issue here。我在这里发布了解决方法作为答案。

4 个答案:

答案 0 :(得分:2)

该问题现在显示使用旧版控制台。要更改设置,请打开cmd提示符。右键单击标题以显示属性。
cmd properties

然后取消选中“使用旧版控制台”
Use legacy console

答案 1 :(得分:0)

要更改Windows上的集成终端,您只需要更改terminal.integrated.shell.windows行:

  1. 打开“ VS用户设置”(“首选项”>“用户设置”)。这将打开两个并排文档。
  2. 检查右侧的“用户设置”文档中的"terminal.integrated.shell.windows"是否具有值"C:\\Bin\\Cmder\\Cmder.exe"设置。
  3. 删除此行。

Ctrl + ~现在将打开VSCode的集成终端。

如果上述解决方案不起作用,那么您可以尝试以下值并检查它是否适合您:

// 命令提示符

"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe"

// PowerShell

"terminal.integrated.shell.windows": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"

// Git Bash

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

// Ubuntu(在Windows上)上的Bash

"terminal.integrated.shell.windows": "C:\\Windows\\System32\\bash.exe"

在命令面板(Ctrl + Shift + P)中,使用“查看:切换集成终端”命令。

尝试自定义快捷方式:

[
    {
        "key": "ctrl+`",
        "command": "workbench.action.terminal.toggleTerminal"
    }
]

答案 2 :(得分:0)

好的,完成了这个in VSCode repo issues

现在,在修复之前,请在“用户设置”中关闭ConPTY集成。

vscode conpty setting

答案 3 :(得分:0)

此问题已解决。从VS Code支持人员那里找到了解决方案。

错误:

使用代码3221225786(或类似代码)的终端出口#

”当您在conhost的属性中启用了旧版控制台模式时,可能会发生这种情况。要更改此设置,请从开始菜单中打开cmd.exe,右键单击标题栏,转到“属性”,然后在“选项”选项卡下,取消选中“使用旧版”控制台。”

enter image description here

来源:VS Code docs