microsoft / VSExtensibility

A repo for upcoming changes to extensibility in Visual Studio, the new extensibility model, and language server protocol.
MIT License
351 stars 42 forks source link

[Idea/Request] extend debugger for unmanaged/c++ #386

Closed Caleb-D closed 2 weeks ago

Caleb-D commented 1 month ago

It seems that modifying the debugger behaviors for C++ with the extensibility model is basically impossible, or at least, difficult.

Here are some simple things I would like to do, but have not found good ways to do it yet. Found some kludges, but not efficient.

Natvis does not support overriding debugger visualizers for built-in types. Debugger Visualizers only support .NET types.

I kind of found a kludge to use the expression evaluator to get the memory location of pointers and then using the expression evaluator to get the memory values, but it is all string parsing, both ways, and inefficient, especially when your arrays are 1MB or larger.

Then I have to figure out how to modify the text editor to annotate variables, pop up a dialog to get the length from the user, cache settings about each array (usually the length comes from another variable in the code), etc. Not trivial.

It would be nice if the debugger, especially the data tip popups and watch windows had more VS Extensibility points and ways to read memory for unmanaged debugging. So far, I haven't found...

tinaschrepfer commented 2 weeks ago

Thanks for your feedback! We've opened a suggestion feedback to track this via developer community: https://developercommunity.visualstudio.com/t/VisualStudioExtensibility---Additional/10683513. Please upvote there if you'd like to see this implemented.