1

I try to debug a COM object using Visual Studio 2022 but can't get the internal values from it. Everything is in place, my object is already displayed as {System.__ComObject} but I like to visualize in a Watch window the data it contains. There is also exactly the same question as this one, in this link: Enable native code debugging to deep into COM-object but unfortunately for Visual Studio 2022 that is not a solution and I do not have enough points reputation to add a comment, so my only choice is to create a new one.

Any idea is welcome!

Simon Mourier
  • 132,049
  • 21
  • 248
  • 298
bioan
  • 37
  • 5
  • Please explain what doesn't work in the accepted answer in the linked question, and show some code: https://stackoverflow.com/help/minimal-reproducible-example – Simon Mourier Dec 13 '22 at 13:01
  • Unfortunately In Visual Studio 2022 there is no option Tools-->Options-->Debugging -> enable the option "Use Managed Compatibility Mode" as the solution in the link described. – bioan Dec 13 '22 at 13:12
  • That option used to enable an older version of the managed debugging engine. The good one, last used in VS2010. They rewrote the engine, unfortunately with a lot of bugs and missing functionality. They did a lot of work in VS2017 and VS2019 to lower the bug bar, to the point that turning on that option wasn't necessary anymore. Since it was fundamental 32-bit code, it couldn't be continued into VS2022. Some COM objects just don't provide a peek at their properties at all, particularly so if it doesn't implement IDispatch. You need to debug the COM library itself, source required. – Hans Passant Dec 13 '22 at 13:51

0 Answers0