简体   繁体   English

在Jupyter Notebook中进行IPython风格的ipdb调试?

[英]IPython-style ipdb debugging in Jupyter notebook?

To debug in Jupyter notebook, I use: 要在Jupyter笔记本中调试,我使用:

from IPython.core.debugger import set_trace; set_trace()

However, it only shows a command input box with no support for command history, autocomplete, or color... 但是,它仅显示一个命令输入框,不支持命令历史记录,自动完成或颜色...

I tried other debug options, but they do not work at all, like: 我尝试了其他调试选项,但是它们根本不起作用,例如:

from IPython import embed; embed()
import pdb; pdb.set_trace()
import ipdb; ipdb.set_trace()
import pudb; pudb.set_trace()

Is there a way to have IPython supported debugger in Jupyter notebook? 有没有办法在Jupyter笔记本中支持IPython的调试器?

No, it is not available (yet). 否,尚不可用(尚未)。 It is on the wishlist on the IPython repository. 它在IPython存储库的心愿单上。 We are a small team, there is a lot of interest but is is a lot of work to implement – not necessarily difficult, but the work need to be done. 我们是一个很小的团队,有很多兴趣,但是要执行很多工作–不一定很困难,但是需要完成工作。 There is a bit of design to do ahead of time. 需要提前做一些设计。

Any help on the IPython repository to cleanup issue, review PRs and other task may help the developers to get to it at some point. IPython存储库上用于清理问题,查看PR和其他任务的任何帮助都可以帮助开发人员在某个时候解决它。 Feel free to open an issue on the IPython repository if you do not know how to help and need guidance. 如果您不知道如何提供帮助和需要指导,请随时在IPython存储库上打开问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM