setting breakpoints with nosetests --pdb option

前端 未结 4 628
攒了一身酷
攒了一身酷 2021-01-29 20:51

nosetests --pdb let\'s me halt upon error or failure, but this is too late for my needs. Stepping through code during execution helps me debug where the problem is.

4条回答
  •  猫巷女王i
    2021-01-29 21:12

    If you have ipython, for unlimited awesomeness use:

    import ipdb; ipdb.set_trace() 
    

    *unlimited awesomeness: just like ipython - auto-completion, coloring etc.

提交回复
热议问题