microsoft / microsoft/vscode-cpptools

Breakpoints are not bound when attaching to process under Windows

Aperta
#11,215 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

debugger more info needed
Lingua principale
TypeScript
Stelle
6.2k
Fork
1.7k
Merge medio
14h 46m
PR unite (30g)
61

Descrizione

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?

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Iniziare dalla configurazione di attach cppdbg pubblicata e confrontare il comportamento di attach di VS Code con GDB da riga di comando su Windows 10. Esaminare le limitazioni note e il precedente issue #595, quindi determinare se i breakpoint possono essere associati dopo l’attach; documentare il risultato se il comportamento rimane una limitazione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
cpp, typescript, vscode
Ambito
devtools
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.