microsoft / microsoft/MIEngine

natvis visualizers do not follow typedefs

Open
#1,026 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
859
Forks
233
Avg merge
1d 6h
Merged PRs (30d)
3

Description

See https://github.com/microsoft/vscode-cpptools/issues/3038

The typename retrieved from var-create here could be a typedef.
If the type name can't be matched it should try the actual type retrieved via whatis:

`whatis MyType
<-1539-interpreter-exec console "whatis MyType"
->~"type = std::vector<int, std::allocator<int> >\n"

I guess it could be implemented in https://github.com/microsoft/MIEngine/blob/master/src/MIDebugEngine/Natvis.Impl/Natvis.cs#L929 with something like await _debugger.ConsoleCmdAsync("whatis " + variable.TypeName, allowWhileRunning: true); @pieandcakes ?
Or it could always be resolved during var-create or an additional property added to IVariableInformation.

Contributor guide

No contributing guide indexed for this repository

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 with src/MIDebugEngine/Engine.Impl/Variables.cs around line 496 and src/MIDebugEngine/Natvis.Impl/Natvis.cs around line 929. Trace how var-create supplies the typename and compare it with the whatis result shown in the issue. Done means Natvis visualizers can match a typedef by falling back to the underlying type, with the chosen resolution approach reflected in the relevant variable or debugger flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, csharp
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.