Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (28 sloc) 1.48 KB
layout title ref lang date tags
post
GDB in neovim
2017-08-20-nvim-gdb
en
2017-08-20 16:42:58 +0300
vim cpp

One more essential tool needed for development in C++ is debugger. While I have been quite productive with bare bone GDB and its TUI, still felt like missing few convenient features: code navigation (where to put a breakpoint?), syntax coloring, custom keymaps. Few years ago I found the plugin Conque-GDB, which served pretty well in Vim. However, it hasn't been updated for a while, and doesn't work well in neovim.

So looking around, I first considered neogdb.vim. It is a new plugin, but what's even more promising is that it was derived from the source code of neovim: neovim_gdb.vim. The former started developing abstractions and interfaces away from GDB, which isn't what I really needed. However, the latter is extremely simple, and easy to adapt.

Meet nvim-gdb. It's a thin wrapper around GDB, and thus should be very flexible if I need to script gdb to automatically attach to a process, for instance. I will continue developing the plugin while already applying it in day-to-day work.

<script type="text/javascript" src="https://asciinema.org/a/E8sKlS53Dm6UzK2MJjEolOyam.js" id="asciicast-E8sKlS53Dm6UzK2MJjEolOyam" async></script>