none
Custom DebugEngine - How can I refresh Watch Window when reloading .natvis files? RRS feed

  • Question

  • Hi folks,

    I'm working on a custom DebugEngine and we've written our own natvis engine to consume .natvis files.  It's unclear to me how I might cause the Watch Window, Locals, Autos, etc. to refresh if the user re-loads the .natvis files.

    It would also be nice if there were an easy mechanism to know when to reload the .natvis files.

    Native behavior appears to reload and refresh the DebugProperty views whenever a user saves a .natvis file within the IDE.

    Can someone point me in the right direction or advise if there isn't such a mechanism?

    Thanks,

    Ben

    Tuesday, August 20, 2019 1:21 PM

All replies

  • Hi Ben,

    Welcome to the MSDN forum.

    According to your description, we suggest you can use the debugging monitor or host service in visual studio.

    https://docs.microsoft.com/en-us/windows/win32/netmon2/debugging-a-monitor

    https://devblogs.microsoft.com/visualstudio/a-better-multi-monitor-experience-with-visual-studio-2019/

    Hope it could help you.

    Best Regards,

    Perry


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com


    Wednesday, August 21, 2019 11:33 AM
  • Hi Perry,

    Thanks for the reply but I think there has been some misunderstanding.  I'm not trying to debug a monitor or do anything with network traffic.  I'm developing a custom Debug Engine extension for Visual Studio and I'm wondering if there is an API that monitors .natvis files in the solution for changes.  And if there is an API to cause all the IDebugProperty2's in the Watch Window (etc.) to be re-evaluated.  In other words have Visual Studio invoke IDebugProperty2::GetPropertyInfo() and IDebugProperty2::EnumChildren() as required.

    Thanks,

    Ben

    Thursday, August 22, 2019 9:47 AM
  • Hi Ben,

    Sorry for the first reply can not help you.

    I'm now trying to involve someone more experienced in this topic to research this issue.

    It may take some time, please be patient to wait. Any update I will share here.

    Thanks for your understanding.

    Best Regards,

    Perry


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Friday, August 23, 2019 8:22 AM
  • Hi Ben,

    Sorry to let you wait so long due to discussing this issue with someone more experienced. 

    Since you want to monitor the source code when it is changed and reloaded, you can use IDebugActivateDocumentEvent2 interface. 

    The following document discusses about how to use this interface to manage the debug document:

    https://docs.microsoft.com/en-us/visualstudio/extensibility/debugger/reference/idebugdocument2?view=vs-2019

     

    IDebugEvent2 interface is used to communicate debug related information.

    https://docs.microsoft.com/en-us/visualstudio/extensibility/debugger/reference/idebugevent2?view=vs-2019

    Hope it could help you.

    Best Regards,

    Perry



    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com






    Thursday, September 19, 2019 5:50 AM
  • Hi Perry,

    Thanks for the pointer to the IDebugActivateDocumentEvent2 interface.  That will certainly be helpful.

    I'm somewhat familiar with the IDebugEvent2 interface but it's unclear to me which type of event I need to send to the SDM to cause the Watch Window (and other DebugProperty UI's like Locals, Watch, etc.) to refresh.  Any help would be appreciated.

    Thanks,

    Ben


    Thursday, October 10, 2019 2:23 PM