Debugging Rust in Vim

On Fedora:

yum install termdebug

in ~/.vimrc

let g:termdebug_config = {}
let g:termdebug_config['command'] = 'rust-gdb'

packadd! termdebug
                   

Inside vim:

Termdebug target/debug<executable>

Use Ctrl-W DownArrow to switch between windows

Use :Break to set a breakpoint in the code window

Use Ctrl-W UpArrow to go to the gdb window

use run to run the program and cont to continue after hitting a break point.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.