microsoft / microsoft/vscode-cpptools

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

Ouverte
#2,811 12 commentaires 0 réactions 1 personne assignée Voir sur GitHub

@pieandcakes y travaille déjà.

Depuis le 15/11/2018.

debugger
Langage dominant
TypeScript
Étoiles
6.2k
Forks
1.7k
Merge moyen
14 h 46 min
PR mergées (30 j)
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:

  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

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.