question

DaryaShirokova-1691 avatar image
0 Votes"
DaryaShirokova-1691 asked DylanZhu-MSFT commented

How do I programmatically reload the Call Stack window?

My team is working on a Debug Engine extension for Visual Studio. Our debug symbols have a non-pdb format, thus I am trying to add a custom menu item to load symbols for modules.

Once symbols are loaded, I send IDebugSymbolSearchEvent2 event back to Visual Studio to update the UI.
However this only affects Module window - it is successfully reloaded after receiving the event and shows that symbols are loaded.

But if the Call Stack window is open, its data is not updated (unless you do some UI interaction with the Call Stack window, e.g. reopen it).

How can I programmatically force the Call Stack window to reload?

vs-extensions
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

DylanZhu-MSFT avatar image
0 Votes"
DylanZhu-MSFT answered DylanZhu-MSFT commented

Hi DaryaShirokova-1691,

The 'Call Stack' window is a tool window in visual studio. So you could use IVsUIShell.FindToolWindow(UInt32, Guid, IVsWindowFrame) Method to find it, then reload it through closing and re-opening it. Please refer to this code:
18313-annotation-2020-08-18-122812223.jpg


Note: the GUID is stored in registry, you could download and install Registry Explorer extension to find it quickly.

Best Regards,
Dylan



· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for your reply!

Unfortunately, it seems that this way the data is not really reloaded - the window reopens in the same state (if I double click on Call Stack window though the data is updated).
Is there any way to force the Call Stack window to query the new data?


Best regards,
Darya

0 Votes 0 ·

Hi Darya,

I'm afraid that you can't do this. After my research, there are no relevant interfaces to help reload the data in call stack window(or even the tool window) in visual studio.

Best Regards,
Dylan

0 Votes 0 ·