Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio: Break on variable change?

I have a member variable struct in a C++ class I'm debugging in Visual Studio 2008 Professional. I would like to break any time the struct changes. Is it possible to do this, or must I look for every possible point in the code it could change, and set breakpoints there?

like image 983
Nick Heiner Avatar asked Jul 12 '10 18:07

Nick Heiner


1 Answers

If you can determine the address of the member, you can set a data breakpoint on it:

https://msdn.microsoft.com/en-us/library/5557y8b4.aspx#BKMK_Set_a_data_change_breakpoint__native_C___only_

like image 81
MSN Avatar answered Sep 29 '22 20:09

MSN