none
"Break when value changes" in Custom Debug Engine RRS feed

  • Question

  • What do I need to do to enable "Break when value changes" https://devblogs.microsoft.com/cppblog/data-breakpoints-15-8-update/ in a custom debug engine or custom vsix?

    I saw this post from a while back that made me think that there is some reg value I have to edit to get this enabled but so far haven't found the thing to edit: https://social.msdn.microsoft.com/Forums/vstudio/en-us/0529285d-be50-4ccb-8bbd-d5f36df031f8/data-breakpoint-in-custom-debug-engine?forum=vsx

    (basically for the post linked, to get "New DataBreakpoint" to be enabled, you have to go to the pkgdef file and adding "DataBP=1")
    Friday, September 13, 2019 4:45 PM

All replies

  • Hi ochavez7,

    Sorry for delay in reply.

    After my research and experiments, the data breakpoint could not work on the .Net Framework. Due to CLR limitations(code managed), this feature just support C++ and .net core 3.0 or newer currently. Please refer more :

    https://stackoverflow.com/a/3815230

    How to: Set a Data Breakpoint (Native Only)

    And you could read it to set data breakpoints for C++ and .net core: Set data breakpoints

    Any feedback will be expected.

    Best Regards,

    Dylan


    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

    Monday, September 16, 2019 9:04 AM
  • Thank you for the links, but I forgot to mention the debug engine I'm working on is for C++. The link I had posted about the forum is more relevant to what I'm trying to do.  https://social.msdn.microsoft.com/Forums/vstudio/en-us/0529285d-be50-4ccb-8bbd-d5f36df031f8/data-breakpoint-in-custom-debug-engine?forum=vsx

    We are able to support data breakpoints but the "Break when value changes" still seems disabled. It may be related to not having an expression evaluator implemented but hoping it's not. 

    Monday, September 16, 2019 2:29 PM
  • Hi ochavez7,

    Sorry for my delay.

    Did your debug engine register in your machine? If not, please refer: Register a custom debug engine

    And since data breakpoint will break when the contents of this address changes, not sure if it is related to value address, please confirm if the value address has changed when debug.

    Best Regards,

    Dylan

     


    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 3:43 AM
  • Sorry for delay, yes it is registered and creating data breakpoints do work. I am still been trying to figure out why the option is grayed out. I tried mapping the events that occur while a user right clicks either a watch or local variable :

    - SDM calls the GetMemoryContext function of the instance that implements IDebugProperty3 which is provided to the SDM earlier when the user creates the watch variable or opens the locals window. Returns an instance that implements the interface, IDebugCodeContext3.

    - SDM calls the GetDocumentContext function of the instance that was provided in previous step. Function should return an instance of IDebugDocumentContext2 which I do. 

    From here the SDM retries the steps one more time and then I'm guessing fails silently since it was probably expecting something else and just shows the context menu with the "Break when Value changes..." grayed out.

    Wednesday, October 9, 2019 6:01 PM