After years of research programming in Matlab, I miss the way I could pause a program mid-execution and inspect the variables, do plotting, save/modify data, etc. via the intera
Use the pdb
library.
I have this line bound to
in Vim:
import pdb; pdb.set_trace()
That will drop you into a pdb
console.
The pdb
console isn't quite the same as the standard Python console… But it will do most of the same stuff. Also, in my ~/.pdbrc
, I've got:
alias i from IPython.Shell import IPShellEmbed as IPSh; IPSh(argv='')()
So that I can get into a "real" iPython shell from pdb
with the i
command:
(pdb) i
...
In [1]: