To debug my Python code, I use the ipdb library and use the set_trace() command to place a breakpoint. When the code reaches this, I get an interactive shell with the ipdb> so that I can examine local variables with tab autocomplete.
IPython laptop (Jupyter), however, ipdb.set_trace() does not work. As this post suggested: using ipdb to debug python code in a single cell (jupyter or Ipython)
I use the following alternative for interactive debugging:
from IPython.core.debugger import Tracer Tracer()()
This gives me an ipdb> , but tab autocompletion is not available. Is there a way to enable autocomplete for interactive debugging using an ipython laptop? This is extremely useful, especially when you have many variables with long names.
source share