【发布时间】: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