Setting a data breakpoint for the std :: map element

I have std::map , which is a private member of the class. One of its meanings changes (when it should not), and I cannot understand where. Once the card is assembled, this item will always be the last due to the nature of the keys used.

I am trying to set a breakpoint on the last element (sixth, to be precise) in Visual Studio 2010, but I'm out of luck. I looked at the header of both map and xtree (its base) and cannot find a suitable member to use.

Does anyone know how to set a data breakpoint for an element value in std::map ?

+7
source share
1 answer

You should be able to use the debugger to view the map on the actual .second data .second , and then bind & in front of the expression that it generated. Then put this address at the data breakpoint and make sure you are more fortunate.

+1
source

All Articles