microsoft / microsoft/vscode-cpptools

"Error" in provided XML document STL.natvis

Open
#8,351 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

debugger
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:

  1. 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).
  2. Build the lldb-mi with the toolchain just built.
  3. Compile c++ program via clang -glldb main.cpp -o main.exe
  4. launch the program with the launch.json configuration provided below
  5. Change tabs to the debug console and see the error at the top. It appears that the Priority attribute for Type isn'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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.