I have a method which I am interested to see it’s functionality and dig deeper; so I put a breakpoint and I stepped in the method. This method executes foreach loop along the way and this foeach keeps iterating many times. I am not interested in seeing the iteration going on in foreach loop. Is there a way in Visual Studio I can step out of this loop and continue debugging.
Pressing ctrl+R is the correct option but if your break point is on a line which is inside the for loop, then you will have to first remove the break point and then press ctrl+R on the line on which you want the control to land. I faced this issue while debugging.
Unfortunately, debugger speed has some runtime limitations, which can't be easily fixed. If your code does some high performance computations, Debugger will be at least 3 times slower than usual Run.
That is because foreach is meant to iterate over a container, making sure each item is visited exactly once, without changing the container, to avoid nasty side effects.
Right-click on a line after the loop, then click Run to cursor.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With