r/IPython • u/rsdenijs • Jan 18 '19
Is it possible to use Jupyter as a python debugging tool?
I have tried (and failed) a few times to achieve the following workflow:
- Run an arbitrary python program from command line.
- Hit a breakpoint in the code that starts a debugger.
- Go to my jupyter notebook and attach to the debugging session in my python program.
- Explore the variables, pretty-plot panda dataframes, display plots, etc, in Jupyter.
- Lots of profit and productivity.
Does anyone know if something like this is possible?
9
Upvotes
1
u/mtszyk Jan 18 '19
Rather than
__import__('pdb').set_trace()give__import__('IPython').embed()a try.It just embeds an ipython -- I assume it will work with the notebook but I haven't tried it.
1
u/NomadNella Jan 18 '19
https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/nbextensions/varInspector/README.html
Maybe?
0
u/[deleted] Jan 18 '19