Skip to main content
1 of 2
Luc Hermitte
  • 17.8k
  • 1
  • 33
  • 50

By throwing an exception you should be able to obtain the full (functions) callstack. I've described part the process in a section of the documentation of my library plugin along with the related functions I provide to decode v:throwpoint. IIRC, there is another Q/A where I delved more in details about how its works... Found it! And also here.

There are a few limitations: it only returns calling functions. If your function is called only through commands or mappings, you won't see anything useful. It's also extremely slow: do not abuse of the feature.

Luc Hermitte
  • 17.8k
  • 1
  • 33
  • 50