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

Re: Vim7: breakadd here

Expand Messages
  • Johnny Blaze
    ... maybe I m going crazy. I tested this last night on the sample script I posted and it did as I said. Now it doesn t. I will develop a better example, or
    Message 1 of 4 , Jan 27, 2005
    • 0 Attachment
      On Thu, 27 Jan 2005 22:51:41 +0100, Bram Moolenaar <Bram@...> wrote:
      >
      > Johnny Blaze wrote:
      >
      > > Consider the following:
      > >
      > > gvim
      > > :e \vim\vim7\vimfiles\plugin\test.vim
      > > :lcd \vim\vim7\vimfiles\plugin
      > > <go to any line within a function>
      > > :breakadd here
      > > :breaklist
      > > 1 file c:\vim\vim7\vimfiles\plugin\test.vim line <line>
      > >
      > > :so %
      > > and it doesn't break, however instead of :breakadd here,
      > >
      > > :breakadd file <line> test.vim
      > > :breaklist
      > > 1 file c:\vim\vim7\vimfiles\plugin\test.vim line <line>
      > > :so %
      > > and it always works.
      > >
      > > (the path was just as an example. I tried the following test script:
      > >
      > > fun! Hi()
      > > echo "hi"
      > > endfun
      > >
      > > fun! Hello()
      > > echo "hello"
      > > endfun
      > >
      > > call Hi()
      > > call Hello()
      > >
      > > :breakadd'ing on lines 2 and 6
      >
      > I just tried this, on MS-Windows XP to run into any problems with
      > backslashes. It works just fine for me.
      >
      > After the "breakadd here" and sourcing the script Vim stops before "fun!
      > Hello()". It doesn't stop halfway defining a function, that's normal.
      >
      > You didn't expect setting a breakpoint in a script file to work like a
      > breakpoint in a function, did you?
      >
      > I can't think of something in the setup that would break it for you...

      maybe I'm going crazy. I tested this last night on the sample script
      I posted and it did as I said. Now it doesn't. I will develop a
      better example, or check myself into the looney bin :-)

      Thank you for your help Bram. Could you add a note in the help for
      :breakadd that :breakadd file will trigger when the file is sourced,
      and :breakadd func will trigger when it is called?

      --

      . o O pyromancer O o .
    Your message has been successfully submitted and would be delivered to recipients shortly.