microsoft / microsoft/vscode-cpptools
[WSL] Unable to launch /usr/bin/gdb when setting bash.exe as the integrated shell in VS Code.
@pieandcakes is already working on this.
Since Nov 15, 2018.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
I'm unable to launch WSL's installation of gdb when using Visual Studio Code on Windows.
I received an "invalid path" error when I specified this in my launch.json file:
"miDebuggerPath" : "/usr/bin/gdb"
I received an "invalid binary" error when I instead specified this in my launch.json file:
"miDebuggerPath": "/Users/dougdew/AppData/Local/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc/LocalState/rootfs/usr/bin/gdb",
I'm running Windows 10 v1803, WSL, Ubuntu 18.04, VS Code v1.29 and C/C++ Extension v0.20.1
I have no other extensions installed.
To reproduce the bug:
-
Install WSL and Ubuntu 18.04
-
Install VS Code
-
Configure VS Code to use the bash shell by adding this to settings:
"terminal.integrated.shell.windows": "C:\WINDOWS\sysnative\bash.exe"
-
Create directory for cpp project (e.g. /mnt/c/Users/dougdew/Documents/Projects/cpp1)
-
Create *.cpp file (e.g. main.cpp)
-
Create tasks.json file with task to build a.out.
-
Create launch.json file with miDebuggerPath for gdb
-
Create c_cpp_properties.json file
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.