Conditional Breakpoint
Let's say you are debugging the blocking version of the moving spectrum example presented here:
https://github.com/ECE2564-VT/example_blockingToNonblocking
However, you notice a bug that is happening when the frameIndex is greater than 10. You want to quickly go over the project execution until you reach that point. How can you do that? You will need a conditional breakpoint that stops your code only when a certain condition is met. Here are the steps you have to take:
Start debugging. (This is an important step. You cannot complete the below steps without being in an active debugging session.)
Create a regular breakpoint by double-clicking on the sidebar where we want the conditional breakpoint.
Righ-click on the ball representing the newly-created breakpoint.
Click on Breakpoint Properties.
Type the frameIndex == 10 under Debugger Response in front of Condition line.
Click on "Apply and Close"
Now, press the "play" button. Your project will run until the condition is met.
If you were to debug the non-blocking version, frameIndex would have been a member of app struct. In that case, in step 5, you use
app->frameIndex == 10 instead of frameIndex == 10.