请参考我的博客文章以获取完整描述。简述如下:from IPython.core.debugger import Pdb ipdb = Pdb() ipdb.runcall(my_imported_function, args...)