views:

332

answers:

1

Is there a simple way to define a breakpoint, in Visual C++ 2005, that will pause the program whenever a certain value changes? I found Data Breakpoints, but those require a memory address, and provide no simple way to tie that to a variable.

+1  A: 

"In the Address box, type a memory address or expression that evaluates to a memory address. For example, &avar to break when the contents of variable avar change."

http://msdn.microsoft.com/en-us/library/350dyxd0.aspx

Ed Guiness
Thanks! I feel a bit stupid now. =)
Andrei Krotkov
I just wish the same thing was available for C# debugging.
Ed Guiness