microsoft / microsoft/vscode-cpptools

Debugger not starting

Offen
#7,530 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

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

Beschreibung

Bug type: Debugger

  • OS and Version: Windows 10 Build 19042.985
  • VS Code Version: 1.56.2
  • C/C++ Extension Version: v1.4.0-insiders
  • other extensions: remote-ssh

I've been working with remote-ssh and c/c++ without any issue, all of a sudden I cannot start the debugger. Nothing changed, configuration files are the same as before but now when I start the debugger, I see for a couple of seconds the top debugging bar and then it disappears. No message on the console, nothing.

For this purpose, I created a simple project from scratch, and even there, the same issue appears.

To Reproduce
launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/a.out",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "logging": { "engineLogging": true },
            "externalConsole": true,
            "MIMode": "gdb",
            "miDebuggerPath": "/usr/bin/gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": false
                }
            ]
        }
    ]
}

main.c

#include <stdio.h>
int main(){
	printf("ciao\n");
	return 1;
}

Compile with gcc -g main.c

As I stated before, this workflow worked for me, from one second to another it stopped working as intended and I have no idea why and how to fix it, any help is appreciated.

What I tried

  • reinstall vscode
  • reinstall the c/c++ extension and delete by hand the extension folder
  • numerous reboots

Updates

I have tried with the wsl-remote extension and it is working as expected.

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.

Rechercherichtung

Beginne damit, den Fehler mit der bereitgestellten launch.json und main.c unter Verwendung von VS Code 1.56.2, der C/C++-Erweiterung v1.4.0-insiders und des aufgeführten remote-ssh-Setups zu reproduzieren. Untersuche die Ausgabe von engineLogging und vergleiche das Verhalten mit dem gemeldeten WSL-remote-Fall; abgeschlossen ist die Aufgabe, wenn der Debugger startet und für das Beispielprogramm verfügbar bleibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
c, cpp, vscode
Bereich
devtools
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

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