How can I skip over a loop using pdb.set_trace()?
For example,
pdb.set_trace()
for i in range(5):
print(i)
print('Done!')
pdb prompts before the loop. I input a command. All 1-5 values are returned and then I’d like to be prompted with pdb again before the print('Done!') executes.
Try the
untilstatement.Go to the last line of the loop (with
nextorn) and then useuntilorunt. This will take you to the next line, right after the loop.https://pymotw.com/3/pdb/index.html has a good explanation