【问题标题】:pipeTransport program can't be found when debugging with vscode and wsl用vscode和wsl调试时找不到pipeTransport程序
【发布时间】:2020-02-02 10:48:24
【问题描述】:

我尝试用wsl在vscode中编译调试c++程序,编译成功,但是当我尝试按F5调试时,报错是管道程序启动失败。这是我的launch.json。

{
    "version": "0.2.0",
    "configurations": [
      {
        "name": "(gdb) Launch",
        "type": "cppdbg",
        "request": "launch",
        "program": "/home/maxu/projects/helloworld/helloworld.out",
        "args": [""],
        "stopAtEntry": true,
        "cwd": "/home/maxu/projects/helloworld/",
        "environment": [],
        "externalConsole": true,
        "windows": {
          "MIMode": "gdb",
          "miDebuggerPath": "/usr/bin/gdb",
          "setupCommands": [
            {
              "description": "Enable pretty-printing for gdb",
              "text": "-enable-pretty-printing",
              "ignoreFailures": true
            }
          ]
        },
        "pipeTransport": {
          "pipeCwd": "",
          "pipeProgram": "c:\\windows\\sysnative\\bash.exe",
          "pipeArgs": ["-c"],
          "debuggerPath": "/usr/bin/gdb"
        },
        "sourceFileMap": {
          "/mnt/c": "${env:systemdrive}/",
          "/usr": "C:\\Users\\maxu1\\AppData\\Local\\Packages\\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\\LocalState\\rootfs\\usr"
        }
      }
    ]
  }

这是错误信息 error message

我尝试将参数“pipeProgram”修改为“c:\windows\system32\bash.exe”,但同样失败。

【问题讨论】:

    标签: visual-studio-code windows-subsystem-for-linux


    【解决方案1】:

    除了我的管道程序是 c:\windows\system32\openssh 下的 ssh.exe 之外,我遇到了和你类似的问题。

    这是我的工作方式:将 openssh 文件夹复制到 c:\ 并将该路径添加到我的用户路径环境变量中。你可以试一试。

    不知道能否从vscode访问windows系统文件夹。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-11-27
      • 2019-05-02
      • 1970-01-01
      • 2018-03-10
      • 1970-01-01
      • 1970-01-01
      • 2018-09-11
      相关资源
      最近更新 更多