1import pdb
2
3<SOME_CODE>
4pdb.set_trace()
5
6### OR ###
7from pdb import set_trace as bp
8
9<SOME_CODE>
10bp()
1import pdb
2def fact(x):
3 f = 1
4 for i in range(1,x+1):
5 pdb.set_trace()
6 print (i)
7 f = f * i
8 return f
9if __name__=="__main__":
10 print ("factorial of 3=",fact(3))