Launch an IPython shell on exception

前端 未结 10 2376
长情又很酷
长情又很酷 2020-12-04 09:30

Is there a way to launch an IPython shell or prompt when my program runs a line that raises an exception?

I\'m mostly interested in the context, variables, in the sc

10条回答
  •  青春惊慌失措
    2020-12-04 10:03

    Do you actually want to open a pdb session at every exception point? (as I think a pdb session opened from ipython is the same as the one open in the normal shell). If that's the case, here's the trick: http://code.activestate.com/recipes/65287-automatically-start-the-debugger-on-an-exception/

提交回复
热议问题