setting breakpoints with nosetests --pdb option

前端 未结 4 620
攒了一身酷
攒了一身酷 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:19

    If you are using pytest, you can use

    import pytest; pytest.set_trace()
    

    See documentation.

提交回复
热议问题