microsoft / microsoft/vscode-cpptools

_NT_SYMBOL_PATH environment is not appreciated by the debugger

Aperta
#1,247 9 commenti 5 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

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

Descrizione

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.

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 riproducendo la configurazione di avvio di Windows 7 con il debugger cppvsdbg e il valore di _NT_SYMBOL_PATH mostrato nell’issue. Verifica come l’estensione VS Code C/C++ gestisce quella variabile d’ambiente quando avvia il binario Rust/MSVC. Il lavoro è completato quando i file PDB di sistema di Windows vengono scaricati nella cache configurata e i relativi simboli vengono caricati per i frame del debugger.

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

Valutazione

Stack tecnologico
cpp, rust, typescript, vscode
Ambito
devtools, operating-systems, tooling
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
32/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.