microsoft / microsoft/vscode-cpptools

_NT_SYMBOL_PATH environment is not appreciated by the debugger

Offen
#1,247 9 Kommentare 5 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

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

Beschreibung

I think it is bug, although I am not sure if it is supported feature.

* Operating System and version: Windows 7
* VS Code version and if you are using the Insiders build: 1.17.2 (not Insiders)
* C/C++ extension version: 0.14.2
* Other extensions you installed and if the issue persists after disabling them: not sure
* step-by-step instructions to reproduce the issue: 

I am launching a binary under the debugger with the following settings:

     {
            "name": "(Windows) Launch",
            "type": "cppvsdbg",
            "request": "launch",
            "program": "${workspaceFolder}/target/debug/hello_cargo.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": true
        }

A binary is a sample rust program compiled to native MSVC.

The debugger shows the output:

-------------------------------------------------------------------
You may only use the C/C++ Extension for Visual Studio Code with
Visual Studio Code, Visual Studio or Visual Studio for Mac software
to help you develop and test your applications.
-------------------------------------------------------------------
Loaded 'C:\Projects\Tait\hello_cargo\target\debug\hello_cargo.exe'. Symbols loaded.
Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\advapi32.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\sechost.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\ws2_32.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\nsi.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\vcruntime140.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\api-ms-win-crt-runtime-l1-1-0.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\ucrtbase.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\api-ms-win-core-timezone-l1-1-0.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\api-ms-win-core-file-l2-1-0.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\api-ms-win-core-localization-l1-2-0.dll'. Cannot find or open the PDB file.

I can set a breakpoint in my code and catch it successfully, but frames from ntdll, kernel32, etc. are not resolved. Although, I have got symbols path set:

_NT_SYMBOL_PATH=srv*C:\symbols*http://msdl.microsoft.com/downloads/symbols

Local symbols cache folder is not getting populated.

Expected behavior:

  • PDB files are getting down loaded, cached locally, and loaded by the debugger.

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

Beginne damit, die Windows 7-Startkonfiguration mit dem Debugger cppvsdbg und dem im Issue gezeigten Wert von _NT_SYMBOL_PATH zu reproduzieren. Prüfe, wie die VS Code C/C++-Erweiterung diese Umgebungsvariable beim Starten der Rust/MSVC-Binärdatei verarbeitet. Als erledigt gilt die Aufgabe, wenn Windows-System-PDB-Dateien in den konfigurierten Cache heruntergeladen und ihre Symbole für Debugger-Frames geladen werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cpp, rust, typescript, vscode
Bereich
devtools, operating-systems, tooling
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
32/100

Neue Issues direkt in Ihr Postfach

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