[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 250
  • Last Modified:

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

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
BlakeMcKenna
Asked:
BlakeMcKenna
  • 3
  • 2
1 Solution
 
Fernando SotoCommented:
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
 
BlakeMcKennaAuthor Commented:
I can't find anywhere in VS the "Breakpoint Hit Count" dialog box??
0
 
Fernando SotoCommented:
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
 
BlakeMcKennaAuthor Commented:
Thanks, that helped FernandoSoto!
0
 
Fernando SotoCommented:
Not a problem BlakeMcKenna, glad to help.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now