Closed
Description
From @ajssousa on March 9, 2018 16:10
- VSCode Version: 1.21.0
- OS Version: Windows 10 1709
Hi.
I have the WSL using Ubuntu and want to use gdb installed on WSL through the VSC.
Evertything works fine if i use the full path like in WSL (e.g. /mnt/c/Users/..)
The problem is if i want to use relative paths, the VSC is not converting an passing right to gdb inside WSL.
Steps to Reproduce:
1.
My setup:
"name": "gdb using WSL bash",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/s3/S3IDMain",
"args": [""],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/s3/",
"environment": [],
"externalConsole": true,
"pipeTransport": {
"debuggerPath": "/usr/bin/gdb",
"pipeProgram": "C:\\Windows\\sysnative\\bash.exe",
"pipeArgs": ["-c"],
"pipeCwd": ""
},
"sourceFileMap": {
"/mnt/e": "e:\\"
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
It says Unexpected GDB output from command "-environment-cd"
Using the ${workspaceFolder} or even using the Linux relative paths (../) he is not converting correctly to send to gdb. If the put the full path as a Linux style, no problem (e.g. of full path that works: /mnt/e/edws/svn-edws/s3/S3Trunk/S3/S3Mains ).
Copied from original issue: microsoft/vscode#45418