Solved

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

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

757 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

21 Experts available now in Live!

Get 1:1 Help Now