Solved

How to stop execution when a Watch Value changes in VS?

Posted on 2013-11-26
5
242 Views
Last Modified: 2013-11-26
Is it possible to set a watch or quick watch on a variable in Visual Studio 2012 and have execution break when the value changes? If so, can someone point to a tutorial or give a quick explanation on how to do this?

Thanks!
0
Comment
Question by:BlakeMcKenna
  • 3
  • 2
5 Comments
 
LVL 63

Expert Comment

by:Fernando Soto
ID: 39678577
Hi BlakeMcKenna;

You can use a breakpoint. Look at this web page, "Breakpoints: Use Hit Counts, Call Stack Functions, and Conditions to Break When and Where You Want in the Visual Studio Debugger", in the section called, "Specify a breakpoint condition using a code expression".
0
 

Author Comment

by:BlakeMcKenna
ID: 39678674
I can't find anywhere in VS the "Breakpoint Hit Count" dialog box??
0
 
LVL 63

Accepted Solution

by:
Fernando Soto earned 500 total points
ID: 39678727
Set a breakpoint. Then right click on that breakpoint you wish to configure then you will see a context menu as shown below and also in the web page I pointed too. You will find Hit Count as well as Condition and others. Debug Menu
0
 

Author Comment

by:BlakeMcKenna
ID: 39678773
Thanks, that helped FernandoSoto!
0
 
LVL 63

Expert Comment

by:Fernando Soto
ID: 39678783
Not a problem BlakeMcKenna, glad to help.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question