Open akbyrd opened 2 years ago
After poking at this some more, I think VS2019 shows the same behavior. I'm not sure why it appeared to be working previously. Probably something with the extension not being updated/replaced properly.
When I have an array variable the root visualized expression name is L"[0]"
and the full name is L"()[0],nd"
. I use the full name to create a language expression and hand that to EvaluateExpressionCallback
. Obviously, it doesn't know what do with that expression.
It's only the display string on the root that is messed up. When I expand it the root visualized expression full name is L"avDefault[0]"
as expected. Though it does mean that the name shows up funny in the Watch window.
I see a similar issue if I have a pointer value and I use ,1
to tell the Watch window it's an array. Name and full name are both L""
when expanding the root object.
Note that the VSIX project may not load. I added the Microsoft.VSSDK.BuildTools
nuget package and added Microsoft.VsSDK.targets
as a build customization. When redistributing the project (without the nuget package directory) the project won't load because the targets file is missing. The targets file can't be downloaded unless you can load the project and let nuget re-download packages. Fun chicken and egg problem.
This may be an issue with my implementation, but I've noticed that when I try to create a visualizer that just kicks the work back to the default expression evaluator I get different results than when I have no visualizer at all. In particular, I start to see
???
in the display string for array elements in the Watch window.In this screenshot the
NoVis
type has no custom visualizer at all. Notice that it shows the value of the single array element in the display string. TheDefaultVis
type has a custom visualizer but all it does is callback intoEvaluateExpressionCallback
fromEvaluateVisualizedExpression
and setpUseDefaultEvaluationBehavior
to true inUseDefaultEvaluationBehavior
.I'm using VS2022 (17.0.4) here.![image](https://user-images.githubusercontent.com/484784/148440891-e0875e3b-9f4c-4a8b-a2c0-bfb8ce9bb1b8.png)
In VS2019 (16.11.8) I get slightly different results. I can run the same solution (after downgrading the Microsoft.VSSDK.BuildTools package and build tools version) and it works correctly. However, it will exhibit the same issue if I set![image](https://user-images.githubusercontent.com/484784/148442421-0bfb67a1-2333-4418-845e-a7f40e6874d1.png)
pUseDefaultEvaluationBehavior
to false and then use the callbacks to do default visualization in the rest of theIDkmCustomVisualizer
functions.vs-native-debug-visualizer-github.zip