Gdb and LLDB integration with NeoVim.
Taken from the neovim: neovim_gdb.vim
It is instantly usable: type <leader>dd
, edit GDB launching command, hit <cr>
.
Or type <leader>dl
to do the same with LLDB backend.
If you use vim-plug, add the following line to your vimrc file:
Plug 'sakhnik/nvim-gdb'
Or use any other plugin manager:
- vundle
- neobundle
- pathogen
To disable the plugin
let g:loaded_nvimgdb = 1
See :help nvimgdb
for the complete online documentation. Most notable commands:
Mapping | Command | Description |
---|---|---|
<Leader>dd | :GdbStart gdb -q -f ./a.out |
Start debugging session, allows editing the launching command |
<Leader>dl | :GdbStartLLDB lldb ./a.out |
Start debugging session, allows editing the launching command |
<F8> | :GdbBreakpointToggle |
Toggle breakpoint in the coursor line |
<F5> | :GdbContinue |
Continue execution (continue in gdb) |
<F10> | :GdbNext |
Step over the next statement (next in gdb) |
<F11> | :GdbStep |
Step into the next statement (step in gdb) |
<F12> | :GdbFinish |
Step out the current frame (finish in gdb) |
<c-p> | :GdbFrameUp |
Navigate one frame up (up in gdb) |
<c-n> | :GdbFrameDown |
Navigate one frame down (down in gdb) |
The goal is to have a thin wrapper around GDB and LLDB, just like the official TUI. NeoVim will enhance debugging with syntax highlighting and source code navigation.