Loading ...
Sorry, an error occurred while loading the content.

Syncronizing breakpoints with ipython

Expand Messages
  • Nathan Huesken
    Hi, I am trying to figure out how to connect ipython with gvim. I start gvim in server mode: gvim --servername ipython and jump to a certain position in a file
    Message 1 of 4 , Nov 1, 2009
    • 0 Attachment
      Hi,

      I am trying to figure out how to connect ipython with gvim.

      I start gvim in server mode:
      gvim --servername ipython

      and jump to a certain position in a file with:
      gvim --servername ipython --remote +%d %s

      where %d and %s are replaced linenumber and filename.

      Now, I want to display the error position and debug points in gvim.
      I need to figure out a way to send this information from ipython to
      gvim.

      So how could gvim "receive" this information? Is the quickfix list a
      good idea? How would that work?

      (I am just asking for the gvim side).

      Thanks!
      Nathan

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Reckoner
      these might interest you: http://advice.mechanicalkern.com/question/3/how-can-i-integrate-vim-with-ipython
      Message 2 of 4 , Nov 1, 2009
      • 0 Attachment
        these might interest you:


        http://advice.mechanicalkern.com/question/3/how-can-i-integrate-vim-with-ipython
        http://petro.tanrei.ca/2009/10/5/working-with-vim-and-ipython
        http://vim.wikia.com/index.php?title=IPython_integration&diff=23850&oldid=prev
        http://www.nabble.com/A-useful-couple-of-scripts-td15795814.html



        On Nov 1, 9:36 am, Nathan Huesken <v...@...> wrote:
        > Hi,
        >
        > I am trying to figure out how to connect ipython with gvim.
        >
        > I start gvim in server mode:
        > gvim --servername ipython
        >
        > and jump to a certain position in a file with:
        > gvim --servername ipython --remote +%d %s
        >
        > where %d and %s are replaced linenumber and filename.
        >
        > Now, I want to display the error position and debug points in gvim.
        > I need to figure out a way to send this information from ipython to
        > gvim.
        >
        > So how could gvim "receive" this information? Is the quickfix list a
        > good idea? How would that work?
        >
        > (I am just asking for the gvim side).
        >
        > Thanks!
        > Nathan
        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Nathan Huesken
        ... Hi, Thanks, they are indeed very interesting. But they only tell me, how I can send my current file (or current line) to ipython from vim. That is cool,
        Message 3 of 4 , Nov 2, 2009
        • 0 Attachment
          On Sun, Nov 01, 2009 at 03:13:52PM -0800, Reckoner wrote:
          >
          > these might interest you:
          >
          >
          > http://advice.mechanicalkern.com/question/3/how-can-i-integrate-vim-with-ipython
          > http://petro.tanrei.ca/2009/10/5/working-with-vim-and-ipython
          > http://vim.wikia.com/index.php?title=IPython_integration&diff=23850&oldid=prev
          > http://www.nabble.com/A-useful-couple-of-scripts-td15795814.html
          >

          Hi,
          Thanks, they are indeed very interesting. But they only tell me, how I
          can send my current file (or current line) to ipython from vim. That is
          cool, but I already have that.

          What I want now, is that all the breakpoints enabled in ipython/pdb are
          visible in gvim. And I am wondering if they could communicate through a
          "breakpoint-list-file".

          Regards,
          Nathan

          > On Nov 1, 9:36 am, Nathan Huesken <v...@...> wrote:
          > > Hi,
          > >
          > > I am trying to figure out how to connect ipython with gvim.
          > >
          > > I start gvim in server mode:
          > > gvim --servername ipython
          > >
          > > and jump to a certain position in a file with:
          > > gvim --servername ipython --remote +%d %s
          > >
          > > where %d and %s are replaced linenumber and filename.
          > >
          > > Now, I want to display the error position and debug points in gvim.
          > > I need to figure out a way to send this information from ipython to
          > > gvim.
          > >
          > > So how could gvim "receive" this information? Is the quickfix list a
          > > good idea? How would that work?
          > >
          > > (I am just asking for the gvim side).
          > >
          > > Thanks!
          > > Nathan

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Hari Krishna Dara
          ... Not sure if this information is of use to you, but it might help you give a direction. I use the below code to invoke ipdb from IPython.Debugger import
          Message 4 of 4 , Nov 4, 2009
          • 0 Attachment
            On Mon, Nov 2, 2009 at 12:14 AM, Nathan Huesken <vim@...> wrote:
            >
            > On Sun, Nov 01, 2009 at 03:13:52PM -0800, Reckoner wrote:
            >>
            >> these might interest you:
            >>
            >>
            >> http://advice.mechanicalkern.com/question/3/how-can-i-integrate-vim-with-ipython
            >> http://petro.tanrei.ca/2009/10/5/working-with-vim-and-ipython
            >> http://vim.wikia.com/index.php?title=IPython_integration&diff=23850&oldid=prev
            >> http://www.nabble.com/A-useful-couple-of-scripts-td15795814.html
            >>
            >
            > Hi,
            > Thanks, they are indeed very interesting. But they only tell me, how I
            > can send my current file (or current line) to ipython from vim. That is
            > cool, but I already have that.
            >
            > What I want now, is that all the breakpoints enabled in ipython/pdb are
            > visible in gvim. And I am wondering if they could communicate through a
            > "breakpoint-list-file".

            Not sure if this information is of use to you, but it might help you
            give a direction. I use the below code to invoke ipdb

            from IPython.Debugger import Tracer; debug_here = Tracer()
            debug_here()

            and while this works fine when run from ipython, complains about
            missing editor (or some sort) when run outside ipython. I am guessing
            that ipython already has a concept of an editor that is intimated of
            debugging events, and the default implementation simply ignores or at
            the most lists lines on the console (like when the execution stops on
            a breakpoint). May be there is a way to tap into this API?

            BTW, in case you are wondering, the above code is equivalent to
            "import pdb; pdb.set_trace()".

            --
            HTH,
            Hari

            >
            > Regards,
            > Nathan
            >
            >> On Nov 1, 9:36 am, Nathan Huesken <v...@...> wrote:
            >> > Hi,
            >> >
            >> > I am trying to figure out how to connect ipython with gvim.
            >> >
            >> > I start gvim in server mode:
            >> > gvim --servername ipython
            >> >
            >> > and jump to a certain position in a file with:
            >> > gvim --servername ipython --remote +%d %s
            >> >
            >> > where %d and %s are replaced linenumber and filename.
            >> >
            >> > Now, I want to display the error position and debug points in gvim.
            >> > I need to figure out a way to send this information from ipython to
            >> > gvim.
            >> >
            >> > So how could gvim "receive" this information? Is the quickfix list a
            >> > good idea? How would that work?
            >> >
            >> > (I am just asking for the gvim side).
            >> >
            >> > Thanks!
            >> > Nathan
            >
            > >
            >

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          Your message has been successfully submitted and would be delivered to recipients shortly.