42 -> for i in range(n):
43 foo(i)
Here I am, in the middle of a pdb session. I want to jump to the loop iteration with i = k
I can't test this right now, but I believe that you can use the condition command:
condition bpnumber [condition]
Condition is an expression which must evaluate to true before the breakpoint is honored. If condition is absent, any existing condition is removed; i.e., the breakpoint is made unconditional.
condition