Launch an IPython shell on exception

前端 未结 10 2379
长情又很酷
长情又很酷 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

    Update for IPython v0.13:

    import sys
    from IPython.core import ultratb
    sys.excepthook = ultratb.FormattedTB(mode='Verbose',
         color_scheme='Linux', call_pdb=1)
    

提交回复
热议问题