debugging in python code example
Example 1: python debugger
#preinstalled package
import pdb; pdb.set_trace()
Example 2: debugging python
import ipdb; ipdb.set_trace()
Example 3: pdb debugger
import pdb
def fact(x):
f = 1
for i in range(1,x+1):
pdb.set_trace()
print (i)
f = f * i
return f
if __name__=="__main__":
print ("factorial of 3=",fact(3))