Natvis Parity: Missing `,na[⋯]` Specifiers
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
Research direction
Reproduce the NatvisTestType example with the VSCode cppdbg configuration and engineLogging enabled in launch.json; inspect the generated -var-create expression. Compare the expected ,na length/specifier behavior and template substitution with the VS behavior, then verify that the Natvis display expression is accepted and works.
Written by the indexing model from the issue text.
Description
The following simple example serves as a minimal test case. It should work in VS and fail in VSCode.
The type:
template< class T, int n >
struct NatvisTestType final
{
T arr[n];
};
The Natvis:
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="NatvisTestType<*,*>">
<DisplayString>{($T1*)arr,na$T2}</DisplayString>
<Expand HideRawView="true">
<ExpandedItem>arr</ExpandedItem>
</Expand>
</Type>
</AutoVisualizer>
On VSCode "cppdbg", the debugger will say "-var-create: unable to create variable object". Adding "logging": { "engineLogging": true } to the configuration in "launch.json", will show in the debug console that it attempted to do the following:
1: (814) ->(gdb)
1: (814) 1125: elapsed time 3
1: (814) <-1126-var-create - * "(float*)((test).arr),na$T2"
1: (818) ->1126^error,msg="-var-create: unable to create variable object"
This obviously can't work. The syntax is not right, and $T2 didn't even get substituted in properly!
See also related issue (https://github.com/microsoft/MIEngine/issues/1369) for the length itself. One also observes in this example that HideRawView is disrespected (https://github.com/microsoft/MIEngine/issues/1458).
- Dominant language
- C#
- Stars
- 859
- Forks
- 233
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 3
Contributor guide
No contributing guide indexed for this repository
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.
More from microsoft/MIEngine
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
-
question
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in microsoft/MIEngine
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·