sponsor Vim development Vim logo Vim Book Ad

debug.vim : Simple utility to assist in debugging vim scripts

 script karma  Rating 4/1, Downloaded by 1187  Comments, bugs, improvements  Vim wiki

created by
kam onn siew
 
script type
utility
 
description
utility to help in debugging vim scripts
  put this in the plugin directory
  will add a new menu VIM->Debug->....
    menu options
      DebugOn - turns debug on - will display debug text in VIM scripts
      DebugOff - turns debug off - will not display debug text in VIM scripts
      Debug Status - displays debug status in status line
      Insert Debug Text - insert debug text in vim scripts

usage:
  eg in following vim script

1 fun! <SID>JavaImpGenerate()  
2    let impfile = tempname()
3    let currBuff = bufnr("%")
    
  for debugging, insert debug text in above script as follows
1 fun! <SID>JavaImpGenerate()  
2    call Debug("entering JavaImpGenerate")
3    let impfile = tempname()
4    call Debug("impfile = " . impfile )
5    let currBuff = bufnr("%")
6    call Debug("currBuff = " . currBuff )

The debugging stubs in lines 2, 4, 6 will run only if Debug status is on.
 
install details
save debug.vim in plugin directory
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
debug.vim 1.0.0 2002-11-22 6.0 kam onn siew Initial upload
ip used for rating: 3.14.80.45

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github