📜  如何在 python pdb 中设置断点 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:40.763000             🧑  作者: Mango

代码示例2
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))