microsoft / microsoft/vscode-cpptools
debugger doesn't hit breakpoint in my c++ code when assign a map by array
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 6.2k
- Fork
- 1.7k
- Merge medio
- 14h 46m
- PR unite (30g)
- 61
Descrizione
Type: Debugger
debugger doesn't hit breakpoint when assign a map with array.
However it can hit breakpoint normally when assign a map with insert method.
Describe the bug
- OS and Version: WIN10
- VS Code Version: v1.42.0
- C/C++ Extension Version: 0.26.3
- Other extensions you installed (and if the issue persists after disabling them):
- A clear and concise description of what the bug is.
To Reproduce
Please include a code sample and launch.json configuration.
launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"internalConsoleOptions": "neverOpen",
"MIMode": "gdb",
"miDebuggerPath": "C:\LLVM\bin\gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": false
}
],
"preLaunchTask": "Compile"
}
]
}
Steps to reproduce the behavior:
Debugger doesn't hit breakpoint when assign a map with array. ( as attached screen capture code)
However it can hit breakpoint normally when assign a map with insert method.
Additional context
If applicable, please include logging by adding "logging": { "engineLogging": true, "trace": true, "traceResponse": true } in your launch.json
Add any other context about the problem here including log or error messages in your Debug Console or Output windows.

Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo il comportamento dei breakpoint descritto nell’issue con il launch.json fornito su Windows 10, confrontando l’assegnazione di una map a partire da un array con map.insert. L’issue non indica alcun file sorgente né alcun test, quindi procurati innanzitutto l’esempio di codice e i log del debugger mancanti. Il lavoro è completato quando il diverso comportamento dei breakpoint è isolato e il comportamento del debugger è corretto o documentato chiaramente con una copertura di regressione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp, 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
- 20/100