You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working with Python scripts that take a bit longer to run, I like to use from IPython import embed; embed(colors = 'Linux')
From the embedded session, I often find myself wanting to step through functions to inspect what happens inside, and using the debugger for this would be fantastic since it would save me from editing them to put in additional embed()s, and pasting large chunks of code or reloading the modules if they come from a package.
However, I cannot make it work. When using %debug [statement]
, it doesn't find things in my namespace and so I get NameError. When I use ipdb.run('statement')
I get the error
You are currently into an embedded ipython shell,
the configuration will not be loaded.
Any advice, or an explanation of why what I want is impossible or not a good idea?
The text was updated successfully, but these errors were encountered:
anbjork
changed the title
use pre-mortem ipdb from inside IPython.embed
Use pre-mortem ipdb from inside IPython.embed
Dec 18, 2024
When working with Python scripts that take a bit longer to run, I like to use
from IPython import embed; embed(colors = 'Linux')
From the embedded session, I often find myself wanting to step through functions to inspect what happens inside, and using the debugger for this would be fantastic since it would save me from editing them to put in additional embed()s, and pasting large chunks of code or reloading the modules if they come from a package.
However, I cannot make it work. When using
%debug [statement]
, it doesn't find things in my namespace and so I get NameError. When I use
ipdb.run('statement')
I get the error
Any advice, or an explanation of why what I want is impossible or not a good idea?
The text was updated successfully, but these errors were encountered: