vim.reaper icon indicating copy to clipboard operation
vim.reaper copied to clipboard

Consider using vimspector for vscode like debugging

Open dsych opened this issue 4 years ago • 6 comments

There is this REALLY cool project that uses DAP from vscode to allow the same debugging experience by re-using the extension ecosystem.

Check it out here: https://github.com/puremourning/vimspector

Seems like this would go a long way complimenting coc-nvim in emulating IDE features.

dsych avatar Feb 06 '21 03:02 dsych

Thanks for the suggestion! I've heard of this but to be honest haven't had a real reason to use it, though I surely will eventually. I'll take a look myself but I will probably add it since there's nothing else that covers this use case at all.

GideonWolfe avatar Feb 06 '21 03:02 GideonWolfe

Wow this was fast! Great to hear that you will consider it. I use it daily to work on c++ code and so far it has been a blast.

dsych avatar Feb 06 '21 03:02 dsych

Cool! Is there any specific configurations/keybinds that you find to be helpful in your workflow? Maybe <leader>+somekey to open the debug window?

GideonWolfe avatar Feb 06 '21 03:02 GideonWolfe

vimspector comes with a set of predefined keybindings to manage debug sessions, see this. so we just need to set let g:vimspector_enable_mappings. i have also seen people define keymaps for quick navigation between vimspector windows e.g. nmap <leader>dw :call win_gotoid("g:vimspector_session_windows.watches") this will jump the current window to the Watches right away instead of using window navigation; see this link for reference.

dsych avatar Feb 06 '21 04:02 dsych

oh, and using the same window ids you can shift the layout as well, say you dont want the terminal window or you would like to adjust the size of the variables window to be bigger, see this for an example

dsych avatar Feb 06 '21 04:02 dsych

https://github.com/GideonWolfe/vim.reaper/pull/17#issue-691863672 feel free to check my PR and add more bindings

Ziad0dev avatar Jul 19 '21 11:07 Ziad0dev