Improve company productivity with a Business Account.Sign Up

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

Developer

I need to break on a value change in vc10 c++.  The microsoft documentation is not correct for c++.
0
artwilkes
Asked:
artwilkes
  • 3
1 Solution
 
AndyAinscowFreelance programmer / ConsultantCommented:
Visual studio 2010, C++ app:

      int i = 3;
      for(int j = 0; j < 5; j++)
      {
            i = i + 4;    //Line with breakpoint
      }

I've put a breakpoint with a condition i<=14 and set the check to break if the condition value changes.

The breakpoint is hit after the loop has executed a few times (i is now equal to 15)  - ie. everything works correctly.
0
 
artwilkesAuthor Commented:
What I need to do is get a break when the i value in your solution changes, and the problem is configuring vc10 c++ so that this happens.  I need this configuration step by step.  The help files indicate menu items and dialog boxes that don't seem to exist. Sorry the previous question did not have enough detail.
0
 
AndyAinscowFreelance programmer / ConsultantCommented:
0
 
AndyAinscowFreelance programmer / ConsultantCommented:
oops, hit return key too soon.
Step 1) previous comment - right click on breakpoint and select 'condition' from context menu
Step 2) Set your conditions
0012.jpg
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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