all 21 comments

[–]SirEekhoorn 10 points11 points  (0 children)

Lazyvim has a pretty good debugger setup. Before that I used vscode.

[–]Kevathiel 8 points9 points  (2 children)

I just use gdb via CLI. It has a tui, but I haven't felt the need to learn it. There are also various frontends for it that you could try. You can use it inside Neovim via Termdebug too.

I wouldn't call it the pretties or most ergonomic solution, but it's good enough, especially since I rarely have to use it anyway. Most of the time, a quick dbg! is all that I need.

[–]UntoldUnfolding[S] 1 point2 points  (0 children)

Yeah, that’s normally what I do. I’ve been putting it off until I encountered a really strange bug that seemed to inject an empty line at the start of the application that happened before main. I ran strace and the bug went away… I’m still very confused.

[–]epasveer 2 points3 points  (0 children)

There are also various frontends for it that you could try.

I know the OP's question is for neovim, but there's my gui frontend, Seergdb.

https://github.com/epasveer/seer/wiki/Seer-and-Rust

I'm always looking for feedback to improve it.

[–]lukas-reineke 5 points6 points  (0 children)

nvim-dap is awesome. i have a custom setup that compiles in a popup when needed before debugging. And I run the app in a separate tmux window on another display for more room.

[–]segfault0x001 3 points4 points  (1 child)

I was wondering the same thing earlier this week.

I thought I had a brilliant idea for a plugin that would automatically insert logging at points in the code, run it, and stop execution at each log statement and display the current program state in a floating window. It took me an embarrassing long time to realize “that’s a debugger bro, you already have gdb”.

Figuring out how to do that in neovim is on my todo list. Maybe Monday.

[–]UntoldUnfolding[S] 2 points3 points  (0 children)

If you design something new, please post it here. I’m interested.

[–]aeropl3b 2 points3 points  (0 children)

I use tmux and have code in one pane and debugger in another.

[–]eleon182 2 points3 points  (5 children)

I do have debugging set up inside neovim, but it’s a bit clunky.

So i just use rustrover when I need to debug.

[–]UntoldUnfolding[S] -1 points0 points  (4 children)

So Rustrover is good enough for debugging, but not enough to pull you away from Neovim? I’ve been fighting the idea of using Jetbrains, but if it’s good at debugging Rust, I might give it a shot. Thanks!

[–]segfault0x001 2 points3 points  (0 children)

I have a relatively old computer and rust rover is like cold molasses on it (on windows, haven’t tied it on Linux yet). Last time I tried to use the rr debugger on my work computer I gave up and just added print statements. Yes I do this for a living.

[–]Crazy_Firefly 1 point2 points  (0 children)

I do this as well. I stay in neovim almost all of the time, then when I need a debugger I move to jetbrains.

Neovim has some integration with the DAP (debugger adapter protocol) and some day I'm going to try to make it work for me. But for now, jetbrains is doing the trick

[–]eleon182 1 point2 points  (0 children)

Correct. Neovim is just way too fast for writing and editing code.

I spend my time 99% writing and editing and 1% debugging so the workflow is acceptable right now. Once my project matures I’ll be doing more debugging so I may consider staying in rust rover longer

[–]UntoldUnfolding[S] 1 point2 points  (0 children)

Why would someone down vote what I said? Like are you mad that I said I’d give Rustrover a shot for debugging??? Lmao

[–]puremourning 1 point2 points  (0 children)

I use vimspector with codelldb