Let's use the simple program below.
Line 15 will be executed 1000 times. And we are only interested with a given iteration, for example we want to ONLY stop at line 15 with condition <data> = 22.
Create a new breakpoint in debugger dynamically:
Maintain your condition as below:
And then you should see this new conditional break point set in line 15:
Then F8 to continue, the break point is triggered only once when <data> = 22.
You should see your created watch point here:
Execute program, watch point is triggered:
Create a new debugger script:
Click "Script Wizard"->"Variable Value(for Simple Variable)":
The wizard will generate code automatically for you ( marked with red ). You can finish the left code to achieve conditional break( marked with blank ). Save your script with a name.
Now launch your program, load the saved Script:
Then click Start Script:
Break point is triggered only once:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |