microsoft / microsoft/vscode-cpptools
Breakpoints with multiple sourceFileMap mapping only works for the first mapping, not the second one
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 6.2k
- Forks
- 1.7k
- Ø Merge
- 14 Std. 46 Min.
- Gemergte PRs (30 T.)
- 61
Beschreibung
Bug type: Debugger
Describe the bug
- OS and Version: Linux Ubunut 18.04
- VS Code Version: 1.60.2
- C/C++ Extension Version: v1.6.0
- Other extensions you installed (and if the issue persists after disabling them): bazel , yes
- A clear and concise description of what the bug is.
I am on a bazel build for a project with multiple workspaces
Therefore I need multiple entries in the sourceFileMap.
The problem is, all breakpoints in sources from the second source file mapping are disabled.
I can step through the code, and the corresponding code is opened in the editor,
but all breakpoints that are not in files from the first source file mapping become disabled/
To Reproduce
Please include a code sample and launch.json configuration.
Steps to reproduce the behavior:
Set a breakpoint in a file from the second mapping, it is ignored
Set a breakpoint in a file from the first mapping, it works
Remove the first mapping, files will not be found, but the breakpoint from the - now first but previously second - breakpoint work
"version": "0.2.0",
"configurations": [
{
"name": "some_bin",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/current_workspace/.bazel/what/ever/some_bin"
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"sourceFileMap": {
// parent bazel workspace == ${workspaceFolder}
"/proc/self/cwd/external/" : "/home/me/project/",
"/proc/self/cwd/" : "/home/me/project/current_workspace/" ,
}
}
Interestingly, when I set stopAtEntry to true, the main function is stopped, (a file from the second mapping) but all breakpoints int this file are grey out
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, das Problem mit der bereitgestellten launch.json-Konfiguration und ihren beiden sourceFileMap-Einträgen unter dem C++-Debugger zu reproduzieren. Überprüfe das Verhalten von Breakpoints für Dateien in jeder Zuordnung, auch wenn stopAtEntry aktiviert ist. Als abgeschlossen gilt die Aufgabe, wenn Breakpoints in Dateien aus der zweiten Zuordnung aktiviert bleiben und wie diejenigen aus der ersten Zuordnung ausgelöst werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cpp
- Bereich
- devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100