microsoft / microsoft/vscode-cpptools
_NT_SYMBOL_PATH environment is not appreciated by the debugger
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Windows 7 launch configuration with the cppvsdbg debugger and the _NT_SYMBOL_PATH value shown in the issue. Check how the VS Code C/C++ extension handles that environment variable when launching the Rust/MSVC binary. Done means Windows system PDB files are downloaded to the configured cache and their symbols are loaded for debugger frames.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, rust, typescript, vscode
- Domain
- devtools, operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100