Neovim — Debugging Application
Debugging application written in Python, Golang, Rust, and Javascript/Typescript.
Overview
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.
Setup
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