How do I programmatically reload the Call Stack window?

Darya Shirokova 1 Reputation point
2020-08-17T18:42:02.623+00:00

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?

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,997 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Dylan Zhu-MSFT 6,406 Reputation points
    2020-08-18T08:38:10.95+00:00

    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