microsoft / microsoft/vscode-cpptools

Breakpoints are not bound when attaching to process under Windows

Offen
#11,215 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

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

Beschreibung

Environment
  • OS and version: Windows 10
  • VS Code: 1.8.1.0-insider
  • C/C++ extension: 1.16.3
  • GDB version: 11.2
Bug Summary and Steps to Reproduce
  1. Set Breakpoint
  2. Start Process
  3. Attach to Process
  4. Wait for Breakpoint to be bound
Debugger Configurations
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb) Attach Matlab",
            "type": "cppdbg",
            "request": "attach",
            "program": "C:/Program Files/MATLAB/R2022b/bin/win64/MATLAB.exe",
            "MIMode": "gdb",
            "miDebuggerPath": "gdb",
            "setupCommands": [
                {
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                },
                {
                    "text": "handle SIGSEGV nostop"
                }
            ]
        }

    ]
}
Debugger Logs
-
Other Extensions

No response

Additional Information

I am aware of the "known limitations" under https://code.visualstudio.com/docs/cpp/cpp-debug#_known-limitations. However, as already described under #595 , and also described by someone else on stackoverflow, when using gdb via the commandline it can halt the process it is attached to. So the statement under "known limitations" is not as absolute as it seems.

I open this new issue, because my comment in the closed #595 did not get any attention.

What is the difference in invoking gdb via VSCode and via commandline? Why does one not be able to halt the attached process and the other can?

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

Beginnen Sie mit der veröffentlichten cppdbg-Attach-Konfiguration und vergleichen Sie das Attach-Verhalten von VS Code mit dem von GDB über die Kommandozeile unter Windows 10. Prüfen Sie die bekannten Einschränkungen und das frühere Issue #595 und ermitteln Sie anschließend, ob Breakpoints nach dem Attach gebunden werden können; dokumentieren Sie das Ergebnis, falls das Verhalten weiterhin eine Einschränkung darstellt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cpp, typescript, 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
25/100

Neue Issues direkt in Ihr Postfach

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