This should be such an easy question to answer. I'm a bit of a newbie to Visual Studio Code and I'm struggling to work out how to get the "Hit Count" conditional breakpoint feature to work. I've got a simple for loop set up like this:
for (int i = 0; i < 10; i++)
{
cout << i << endl;
}
I put a breakpoint on the cout line, right-clicked it and clicked "Edit Breakpoint..." and changed the drop-down box to "Hit Count". I want to simply have the breakpoint fire on the 5th iteration through the for loop, but I can't figure out how to write the expression. No matter what I write, the program breaks at the first pass through the loop. I've tried "5", "== 5" and "Hit Count == 5" but nothing works.
If anyone could tell me what I'm doing wrong, I'd be grateful! All the stuff I can find online is about Visual Studio and not VSCode.
question from:
https://stackoverflow.com/questions/65873190/vscode-cant-figure-out-hit-count-condition 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…