microsoft / microsoft/vscode-cpptools

[WSL] Unable to launch /usr/bin/gdb when setting bash.exe as the integrated shell in VS Code.

Offen
#2,811 12 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@pieandcakes arbeitet bereits daran.

Seit 15.11.2018.

debugger
Vorherrschende Sprache
TypeScript
Sterne
6.2k
Forks
1.7k
Ø Merge
14 Std. 46 Min.
Gemergte PRs (30 T.)
61

Beschreibung

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:

  1. Install WSL and Ubuntu 18.04

  2. Install VS Code

  3. Configure VS Code to use the bash shell by adding this to settings:

"terminal.integrated.shell.windows": "C:\WINDOWS\sysnative\bash.exe"

  1. Create directory for cpp project (e.g. /mnt/c/Users/dougdew/Documents/Projects/cpp1)

  2. Create *.cpp file (e.g. main.cpp)

  3. Create tasks.json file with task to build a.out.

  4. Create launch.json file with miDebuggerPath for gdb

  5. Create c_cpp_properties.json file

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.