简体   繁体   中英

IPython-style ipdb debugging in Jupyter notebook?

To debug in Jupyter notebook, I use:

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?

No, it is not available (yet). It is on the wishlist on the IPython repository. 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. Feel free to open an issue on the IPython repository if you do not know how to help and need guidance.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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