Detect when a value changes

What I try to achieve is:

I have 2 breakpoints and between those 2 break points, I have a variable whose value is changed. I want to detect in which line the value changes. I think in vb6, you were able to put a watch with condition and whenever that value changed the debugger stop in that line.
Ex:

1	dim x = 0 
2	...
3	…
4	…
5	…
6	…
7	x =55
8	…
9	…
10	…
11	…
12	…


So I have a breakpoint at line 2 and after this point I want to capture in 
which line x value is changed. It should return line number 7. How can I do 
this in Visual Studio 2003(VB/ASP.net).

Thank you very much in advance.
Selim 


Answer this question

Detect when a value changes

  • MichaelEaton

    What you need is a data breakpoint. Unfortunately, they only work when debugging unmanaged code. Judging from various blogs, tt is pretty high on the wish list for the next version, be sure to add your vote.


  • Russ McDaniel

    i guess for the meantime, you can add breakpoints in each line with your condition when the variable changes


  • Detect when a value changes