A common problem I face when debugging recursive methods is that I can't avoid getting trapped into going deeper and deeper into the stack when I want to debug a given piece of code. The only way to avoid getting trapped is to manually disable the BP and then set up it again after the block of code I'm interested in has been passed.
In the above picture, I just want to do a little stroll over the loop's variables for each iteration, seeing if they're behaving as they should and if all's fine and dandy, but I'm currently only getting the first iteration of each call to combinations
!
Any clever ideas to get around this?
Try to use conditional breakpoint if you want to hit the breakpoint only for some condition or for i
th recursion depth. If you want to unwind recursion, after some of your testing/validation, while debugging you can change the value of the base condition variable from eclipse debugger.
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