If your debugger allows you to use breakpoints and change the values โโof variables when you are there, it is as simple as [in pseudocode]
Set Boolean yieldValue to true; [breakpoint after that line is executed, you can set yieldValue to false here] if yieldValue, yield value; in other words: bool yieldValue = true; [breakpoint here] if(yieldValue) yield value;
Note that you usually cannot fix a breakpoint on an empty line. However, you will have to stick with it before the if statement.
Warty source share