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

Re: trace/debug scripts

Expand Messages
  • Douglas L Potts
    ... I think you are getting the verbose and debug capabilities confused. By setting verbose you see messages relating to when the script is sourced, not
    Message 1 of 3 , Jun 1, 2001
    • 0 Attachment
      On Fri, Jun 01, 2001 at 03:30:21PM +0200 Coen Engelbarts wrote:
      > Hi,
      >
      > I want to run a vim script in "debug mode", i.e. do :source script.vim and
      > see the verbose output & error messages of the script.
      > Setting verbose=20 does not help. All I get is:
      >
      > sourcing "script.vim"
      > finished sourcing "script.vim"
      >
      > Setting verbose=20 in the first line of script.vim does not help, either.
      I think you are getting the verbose and debug capabilities confused. By
      setting verbose you see messages relating to when the script is sourced,
      not messages about when it is run.

      For messages about what happens when it is run you would need the :debug
      capability, which I believe is only in Vim6.0.

      Of course you could hand edit the script.vim so that you do:

      if &verbose > x
      echo "Some text about what is happening"
      endif

      HTH,
      -Doug

      --
      *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
      Douglas L. Potts Url: http://www.bigfoot.com/~pottsdl
      "There are no real ANSWERS; just cross references..."
      - Steve Presutti 7/31/97
      *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
    • Coen Engelbarts
      ... Yes, my vim5.7 only has a debug option to compile vim to create core dumps after a crash. Well, at least I know now what s possible. Thanks for the quick
      Message 2 of 3 , Jun 1, 2001
      • 0 Attachment
        > > I want to run a vim script in "debug mode", i.e. do :source
        > script.vim and
        > > see the verbose output & error messages of the script.

        > I think you are getting the verbose and debug capabilities
        > confused. By
        > setting verbose you see messages relating to when the script
        > is sourced,
        > not messages about when it is run.
        >
        > For messages about what happens when it is run you would need
        > the :debug
        > capability, which I believe is only in Vim6.0.
        >
        > Of course you could hand edit the script.vim so that you do:
        >
        > if &verbose > x
        > echo "Some text about what is happening"
        > endif


        Yes, my vim5.7 only has a debug option to compile vim to create core dumps
        after a crash.
        Well, at least I know now what's possible.

        Thanks for the quick answer!

        Coen
      Your message has been successfully submitted and would be delivered to recipients shortly.