3 ms·
If you're using print debugging in python try this instead: > import IPython; IPython.embed() That'll drop you into an interactive shell in whatever context y
by ghgr 2y ago
If you're using print debugging in python try this instead:
> import IPython; IPython.embed()
That'll drop you into an interactive shell in whatever context you place the line (e.g. a nested loop inside a `with` inside a class inside a function etc).
You can print the value, change it, run whatever functions are visible there... And once you're done, the code will keep running with your changes (unless you `sys.exit()` manually)