microsoft / microsoft/vscode-cpptools

Sometimes stops where no breakpoint exists, sometimes doesn't stop at the breakpoint where should have stopped :(

Aperta
#11,429 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

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

Descrizione

Environment
  • OS and version: ubuntu 20.04
  • VS Code: 1.82.0
  • C/C++ extension: v1.17.5
  • GDB / LLDB version: GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
Bug Summary and Steps to Reproduce

Bug Summary:
case1: Sometimes debugger stops where no breakpoint exists. However, gdb say that there is a breakpoint on current stop location when I run "-exec info b" in DEBUG CONSOLE. It's certain that I didn't set a breakpoint. After run "-exec clear", it finally escaped.
case2: There is also the opposite situation. Sometimes doesn't stop at the breakpoint where should have stopped. In the case, code just like:
while ( true )
{
if ( condition1 ){
break; // breakpoint here
}
if ( condition2 ){
break; // breakpoint here
}
}

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": "open_pit_mine-new_cloud_app",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/build/modules/app/open_pit_mine/open_pit_mine-new_cloud_app",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ],
            "logging": {
                "engineLogging": true,
                "traceResponse": true
            }
        }
    ]
}
Debugger Logs
"HitNonExit.txt" for case1, debugger stops  just as it starts, it should be noted that it's not the entry position of program and "stopAtEntry" is false.

"NonHitBp.txt" for case2, and it contains case1's log.
Other Extensions

No response

Additional Information

HitNonExit.txt
NonHitBp.txt

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

Inizia con i log allegati HitNonExit.txt e NonHitBp.txt, quindi confronta i due casi riportati con la configurazione di avvio e il codice di riproduzione forniti. Il lavoro è completato quando il debugger si arresta solo sui breakpoint configurati, raggiunge entrambe le istruzioni break contrassegnate quando vengono raggiunte e non si arresta inaspettatamente altrove.

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

Valutazione

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.