Comment définir le point d'arrêt dans Python PDB
import pdb
<SOME_CODE>
pdb.set_trace()
### OR ###
from pdb import set_trace as bp
<SOME_CODE>
bp()
Blue Boar
import pdb
<SOME_CODE>
pdb.set_trace()
### OR ###
from pdb import set_trace as bp
<SOME_CODE>
bp()
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))