• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 252
  • 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 SotoRetiredCommented:
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 SotoRetiredCommented:
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 SotoRetiredCommented:
Not a problem BlakeMcKenna, glad to help.
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

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