What is the preferable, general method of debugging/tracing vim plugins ? Suppose I have got a fairly sophisticated plugin Foo, which on a key pressed F9 opens new window with file-browser and gives the possibility to choose a file, after that the filename is copied into the main window. I would like to see what is called when I press the F9 key, some kind of call trace.
What is the preferable, general method of debugging/tracing vim plugins ? Suppose I have
Share
The best way I have found is to use the
-Vflag when starting (g)vim. You can specify a level of tracingNand a filename for the written log:Then trace messages will be given for each file that is sourced. (See
:help -Vfor more info.)Trawling through the resulting logfile can be painful, but it is usually pretty informative. I find it best to view the logfile before and after the trigger event (pressing
<F9>in your case) to get a picture of when is happening.