microsoft / microsoft/vscode-cpptools
"Error" in provided XML document STL.natvis
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Bug type: Debugger
Describe the bug
- OS and Version: Windows 10
- VS Code Version: 1.61.0
- C/C++ Extension Version: 1.7.0
- Other extensions you installed (and if the issue persists after disabling them): N/A
Error "There is an error in the XML document (281, 41)." while reading file: C:\Users\{user}\.vscode\extensions\ms-vscode.cpptools-1.7.0\debugAdapters\vsdbg\bin\Visualizers\STL.natvis"
To Reproduce
Please include a code sample and launch.json configuration.
Steps to reproduce the behavior:
- Build LLVM, clang and lldb with libxml2 for Windows *huge pain (llvm-projects fault here really. Necessary for both lldb-mi and for an appropriate version of python).
- Build the
lldb-miwith the toolchain just built. - Compile c++ program via
clang -glldb main.cpp -o main.exe - launch the program with the launch.json configuration provided below
- Change tabs to the debug console and see the error at the top. It appears that the
Priorityattribute forTypeisn't being handled.
{
"name": "(lldb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/main.exe",
"targetArchitecture": "x64",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"MIMode": "lldb",
"miDebuggerPath": "lldb-mi.exe",
"externalConsole": false,
"showDisplayString": true,
"visualizerFile": "C:\\Users\\{user}\\.vscode\\extensions\\ms-vscode.cpptools-1.7.0\\debugAdapters\\vsdbg\\bin\\Visualizers\\STL.natvis",
}
Additional context
This is on a system without internet. As such I am unable to provide any log files. Please also disregard any typos in the provided launch config as it was typed by hand.
I can't seem to find where the visualizer files are being handled in the repo. I would like to be able to patch fix it into the extension on my local machine if at all possible but if I need to wait for another release it is understandable.
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 inspecting the STL.natvis file at line 281 and the debugger visualizer handling used with lldb-mi. Reproduce with the provided launch.json configuration and confirm how the Priority attribute is parsed. Done means the visualizer loads without the XML error in the debug console.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100