Search code examples
c++windowsvisual-c++breakpoints

How to set breakpoints programmatically in Visual C++?


What I am trying to do is to monitor memory value changes at some specific addresses, like binding a callback func to the 'onChange' event.

One idea for now that I can think up is to use memory write breakpoint. So how to manipulate breakpoints programmatically in Visual C++?


Solution

  • Microsoft do provide a breakpoint interface which can be used for this purpose, have a look at http://msdn.microsoft.com/en-us/library/vstudio/envdte.breakpoint.aspx and http://msdn.microsoft.com/en-us/library/envdte80.breakpoint2(v=vs.80).aspx