If you have a reasonable recent version of gdb, you can use the :Termdebug command to debug Vim. See :help :Termdebug. When something is time critical or stepping through code is a hassle, use the ...
Scripts and setting files useful during development of KDE software - KDE/kde-dev-scripts ...