Solved

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

Posted on 2013-11-26
5
238 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 62

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 62

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 62

Expert Comment

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

930 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now