I am using NeoVim for writing go code, for debugging I am using vimspector
The debugging works well, however everytime I exit and restart nvim the breakpoints are lost.
I tried saving the session using vim-session but even that does not work.
Is there a way to save the breakpoints in the session, so that the next time I open the project the breakpoints are restored.


1 Answer 1


This and more (saving of watch window variables) should now be possible with a recent commit on github.

Essentially, prior to exit, you can have something so:

nnoremap <leader>d1 :call vimspector#WriteSessionFile(".vim/debuggingsession.txt")<CR>

Then, the next time you are in, you call:

nnoremap <leader>d2 :call vimspector#ReadSessionFile(".vim/debuggingsession.txt")<CR>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.