:packadd termdebug inside vim/nvim.
This has to be done for every instance, so if you want this to always be enabled then add this to your vimrc.
Also to use
rust-gdb rather than standard
Build your project (so you have something to debug in
From within vim/nvim run
:Termdebug target/debug/<your project>.
This will start gdb.
Now you can set a breakpoint with
:Break and finally run the code with
:Breaksets a breakpoint where the cursor is
:Runstarts the debugger
:Clearremoves the breakpoint under the cursor
:Oversteps over the current line
:Stepsteps into the current line
:Continueto continue execution
:Evaluateto execute selected code or code under cursor
For more information see
:help Termdebug inside vim/nvim.
Note To see the value of the variable under the cursor:
K (shift + k) by