• 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

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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