使用 IPython 和断点 ()
Using IPython with breakpoint()
如何设置当我调用 breakpoint()
时调用 IPython shell 而不是 pdb?
目前,Python 使用没有完成的 pdb。
通过设置 sys.breakpointhook
来完成,设置 breakpoint()
:
时调用
import sys
import IPython
sys.breakpointhook = IPython.embed
如何设置当我调用 breakpoint()
时调用 IPython shell 而不是 pdb?
目前,Python 使用没有完成的 pdb。
通过设置 sys.breakpointhook
来完成,设置 breakpoint()
:
import sys
import IPython
sys.breakpointhook = IPython.embed