linux.code.hacks.gamedev

// So far, so little

Home Archive About Projects
25 April 2020

Debugging rust in vim

by Linus Probert

So, another issue, another solution. I have been a great big fan of the vim functionality “termdebug” ever since it was introduced with vim 8.1. You can read more about it here and in the help files under “:help terminal-debug”.

As none of you might have noticed I’m pretty big on rust. As it happens they ship with a reall nice wrapper for gdb, namely ‘rust-gdb’. Naturally I wanted that wrapper to work through my default debugging tool within vim.

Here’s how it’s done:

packadd termdebug "Enable terminal-debug
let termdebugger = "rust-gdb" "Use rust-gdb instead of default gdb

That’s it, now you get nice printing in gdb for rust within vim.

Enjoy!

// Liq

tags: