VS代码无法启动终端进程:CreateProcess失败

时间:2020-08-06 07:52:16

标签: visual-studio sapui5 sap-fiori

我试图在VS Code中打开终端窗口,但它失败并显示消息

无法启动终端进程:CreateProcess失败

我看到这个链接有相同的问题,但是他没有解决它。有任何想法吗? https://github.com/microsoft/vscode/issues/57285

settings.json

{
"[xml]": {
    "editor.defaultFormatter": "SAPSE.sap-ux-annotation-modeler-extension"
},
"ui5.plugin.jsCodeLens": true,
"ui5.plugin.ui5version": "1.71.22",
"sap.ux.serviceModeler.selectDefaultView": "Expanded",
"workbench.editorAssociations": [
],
"terminal.integrated.windowsEnableConpty": false
}

2 个答案:

答案 0 :(得分:0)

我可以使用settings.json中的以下代码行进行修复

https://github.com/microsoft/vscode/issues/66894

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

答案 1 :(得分:-1)

当我启动终端时,它无法正常工作。我收到了这样的错误:

enter image description here

然后我打开 settings.json 并删除整个代码并打开 https://code.visualstudio.com/docs/editor/integrated-terminal。复制 powershell 的链接:

"terminal.integrated.profiles.windows": {
  "PowerShell -NoProfile": {
    "source": "PowerShell",
    "args": ["-NoProfile"]
  }
},

如果你想链接 Git bash 那么

  1. 安装git
  2. 复制你的git目录的链接
    • 我的目录是:“C:\Program Files (x86)\Git\bin\bash”
  3. 像这样粘贴
    "terminal.integrated.profiles.windows": {
      "PowerShell -NoProfile": {
        "source": "PowerShell",
        "args": ["-NoProfile"]
      }
        "C:\\Program Files (x86)\\Git\\bin\\bash"
    },
    

关闭窗口,现在重新启动 VS Code。然后你就可以打开终端了。

相关问题