top | item 35523212

(no title)

DixieDev | 2 years ago

Anyone got other useful tools for debugging within (neo)vim? Just seamlessly putting down breakpoints, stepping through code execution, and getting a fully fledged debugging UI experience (a la Visual Studio or Remedy BG)? This is possibly the only thing I miss from developing on Windows, and it's a shame!

EDIT: I specified 'within vim' but actually I'd be down for standalone Linux app recommendations too.

discuss

order

gavinhoward|2 years ago

Shameless plug, but my development environment [1] may be close to what you're looking for. (There's pictures!)

A couple of details have changed since that post. The only one that you might care about is that I now have two tmux panes with gdb-dashboard. This is meant to use space better. One pane has all of the variables and nothing else. The other has everything else.

If you care about that, I'll tell you how to do it.

[1]: https://gavinhoward.com/2020/12/my-development-environment-a...

zteppenwolf|2 years ago

This is very cool! I created this small convenience script without the intent to customize `Termdebug` itself, leaving any preferences to the users. But I can see many nice things you added there that can combine very well with the two!

BaculumMeumEst|2 years ago

The overall quality of a debugger is far more important than the question of which text editor it's integrated with for me personally.

To that end I would say Intellij products have the best debugging experience I've found on Linux. VS Code after that.

9029|2 years ago

I'm surprised nvim-dap-ui wasn't mentioned yet. It still has less features than vimspector, but personally I prefer the nvim-dap ecosystem. No memory viewer is a bummer though.

https://github.com/rcarriga/nvim-dap-ui

JamesonNetworks|2 years ago

So over the weekend I just went through a vim reworking for myself after discovering astronvim. I replaced my config with that one and installed nvim-dap-python through the user template, was able to attach and debug like I was using pycharm in a few hours of tweaking. I really like it

I did have a couple of plugins I cant really live without (ZoomWinTab and A.vim) so Im working on porting them to lua with the help of chatgpt. Really like the experience so far. Def worth checking out astronvim / nvchad

nkjnlknlk|2 years ago

Finding astronvim through this comment and it looks like it may be time to move on from my regular vim to nvim. I like keeping things light so I'll probably just steal some plugins used there but the functionality looks like things I already have except with better UX. Thanks for sharing!

qbasic_forever|2 years ago

VS code plus its vim key binding plugin. The neovim plugin world is just way too unstable in my experience.

II2II|2 years ago

Came here to say pretty much the same thing, except I use the Neovim extension for VS Code. It uses Neovim as the backend and, from my experience, behaves a lot more like (Neo)Vim. It is much easier to setup, since debugging is handled by VS Code. The main drawback is VS Code does not work in a terminal, which is okay IMHO since you still have access to Neovim from the shell.

flohofwoe|2 years ago

VSCode with the CodeLLDB or MS C/C++ extensions both usually work out of the box for debugging most compiled languages (so far I tried C/C++, Rust and Zig), but compared to proper Visual Studio it's very bare bones (especially the variable view panel).

delta_p_delta_x|2 years ago

> compared to proper Visual Studio

Debugging in proper Visual Studio is by far the most pleasant experience I have ever had. Flame graphs, call graphs, memory and CPU utilisation graphs, straightforward call stacks and variable views... FOSS debugging utilities don't even come close to the debugging productivity on VS 2022.

favadi|2 years ago

I tried nvim-dap but it is somewhat clunky, unintuitive to use. Turn out that that using delve, gdb, pydb directly on the command line is fine, I don't really need editor integration.

salicideblock|2 years ago

termdebug (used by the tool linked in the topic) basically does this for anything you can debug in GDB. It's the tightest integration of debuggers and (neo)vim I have used.

There are also DAP-based integrations, which I have put the effort into using.

ilikehurdles|2 years ago

Look into nvim-dap and the ecosystem around it.