C ++ debugging in vis studio 2008 how to break when a variable becomes null

I can detect when a variable changes , but it changes so often that it is not being used - what I want is to detect when the variable is null .

Thank,

+2


source to share


2 answers


This is not possible in Visual Studio. Visual Studio supports several debugging features in this particular area, but I don't think you can combine them into a feature to get what you want.

  • Change of breakpoint values: break on change of value (only supported in C ++)
  • Conditional breakpoints: Abort when IP crosses a breakpoint and a certain condition is met.


What you could do is wrap all the entries in your variable in a setter function. Then use a conditional breakpoint to break when the value changes to 0. I think this is the closest you can get to the function you want.

+2


source


You must use one of these debuggers

1 - http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx

2 - Nice old SoftICE if you can find it anywhere



3 - http://www.sysersoft.com/updatelog.html

Also check out the newer OllyDbg version (it says it supports hardware breakpoints)

+1


source







All Articles