PC Review


Reply
Thread Tools Rate Thread

Breakpoint on Field Change

 
 
Andrew Robinson
Guest
Posts: n/a
 
      7th Feb 2005
Give the following, is it possible to set a breakpoint in C# that fires when
the value of x changes. I want to see the line that is changing the field x.
Optionally, is it possible to fire a breakpoint when the value of x changes
to a specific value (ie x='hello').

thanks,

-Andrew

>>>>>>


private string x = string.Empty;
private void button1_Click(object sender, System.EventArgs e)
{
x = "new value";
}


 
Reply With Quote
 
 
 
 
NuTcAsE
Guest
Posts: n/a
 
      7th Feb 2005
1. Add a break point to the line and open the break-point explorer
(Debug->Windows->Breakpoints)
2. Find the break point you added in the break point explorer, right
click select properties
3. In the break point properties you will find a button labelled
"Condition". Click that and the condition dialog will open
4. Enter the appropriate condition and select either "Is True" or "Has
Changed".
5. Close and debug.

Depending on which debug condition, if is true was specified then the
break point will hit only when the condition you entered evaluates to
true, and "Has Changed" option causes the breakpoint to hit if the
value has changed.

NuTcAsE

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Really weird - Code acting as though breakpoint set, no breakpoint BlueWolverine Microsoft Access VBA Modules 6 13th Mar 2008 04:20 PM
Problem with the breakpoint hitting(at runtime breakpoint was disa Ranjit Microsoft Dot NET Compact Framework 0 23rd Feb 2008 06:56 AM
Breakpoint - does it change your results? =?Utf-8?B?R0hhd2tpbnM=?= Microsoft Access VBA Modules 3 5th Mar 2007 07:21 PM
variable value change breakpoint Maxwell2006 Microsoft C# .NET 5 8th Feb 2006 11:32 PM
project stops at imaginary breakpoint, but no breakpoint exists Mark Microsoft ASP .NET 4 26th Apr 2004 05:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:11 PM.