I want to set breakpoints using pdb and then run the loop in the program until that breakpoint. and then after checking the values keep continuing (only stopping at that point) until the loop ends. how do i do it?
2 Answers
If you can modify the code, one way is to add this line where you want to break:
import pdb; pdb.set_trace()
3 Comments
user3265370
yes i added it. but it stops at that point one time and then when i press c it doesnt stop again (in a loop)
user3265370
I want to keep looping it and stopping it at a point in a loop to check the values
Hedde van der Heide
use 'n' for next and 'c' for continue, or browse the pdb documentation