Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 245
THN Avatar asked Oct 26 '25 14:10

THN


1 Answers

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.

like image 120
Matt Avatar answered Oct 29 '25 02:10

Matt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!