Neovim — Debugging Application

Debugging application written in Python, Golang, Rust, and Javascript/Typescript.

4 min readMar 1, 2021


Neovim Debugging Application


In a previous article on Neovim LSP and DAP, I set up DAP using nvim-dap. In this article, let’s set up debuggers for Python, Golang, Rust, and Javascript/Typescript using vimspector.


Plugin Installation

I am going to leverage the dotfiles I configured in my previous article.

Inlua/plugins.lua, add the following line to install vimspector. You can use whatever plugin manager that you prefer.

-- Debugging
use { 'puremourning/vimspector' }

Run :luafile % and :PackerInstall to install the plugin.

Adapter Installation

Create a file called vimspector.vim under the plugin folder with the following content.

let g:vimspector_enable_mappings = 'HUMAN'nmap <leader>vl :call vimspector#Launch()<CR>
nmap <leader>vr :VimspectorReset<CR>
nmap <leader>ve :VimspectorEval
nmap <leader>vw :VimspectorWatch
nmap <leader>vo :VimspectorShowOutput
nmap <leader>vi <Plug>VimspectorBalloonEval
xmap <leader>vi <Plug>VimspectorBalloonEval
let g:vimspector_install_gadgets = [ 'debugpy', 'vscode-go', 'CodeLLDB', 'vscode-node-debug2' ]

Below are the adapters used for each language.

Make sure you have the dependencies installed, e.g. vscode-go needs delve to be installed.

Run :VimspectorInstall and the 4 adapters should be installed.

Vimspector Adapter Installation

Run :VimspectorToggleLog to see the location of VIMSPECTOR_HOME and gadgetDir.




Software engineer, Data Science and ML practitioner.