[IPython-dev] Getting current list of breakpoints in "sync with editor"
Nathan Huesken
ipython at lonely-star.org
Thu Dec 3 04:20:39 EST 2009
Hi,
I sent this mail to the ipython user mailing list already, but I figured
this might be a better place to post.
I want to syncronize breakpoints between my interactive ipdb in ipython
and gvim. For this, I do in a file which I import with "import":
-------------------------------------------------
def write_breakpoints(ip,filename=""):
...
breakpoints=ip.InteractiveTB.pdb.get_all_breaks()
...
#syncronize with the gvim editor
def sync(ip,filename,linenum,column):
...
write_breakpoints(ip)
...
import IPython.ipapi
ip=IPython.ipapi.get()
ip.set_hook('synchronize_with_editor',sync)
--------------------------------------------------
This seemed to work before. But now (I have not touched it for some
time) it does not work anymore. The list of breakpoints is simply empty.
How can I get the current pdb instance? How can I get its breakpoints
within the sync-with-editor function?
Thanks!
Nathan
More information about the IPython-dev
mailing list