Hacker News new | ask | show | jobs
by OliverM 1409 days ago
Are there no good UI experiences you can bolt onto gdb? Do Emacs/Vim not have nice modes that take some of the pain away?

I've no real experience with using gdb - my main debugger usage has been on the JVM or using old Borland debuggers on Win32. Are there no good open source user-friendly debuggers out there?

I tend to develop software interactively with a REPL where I can so if a good debugger can give you something akin to that experience I'd be very tempted to jump ship from emacs to VSCode to try it for languages like C/C++.

4 comments

Emacs comes with a built in debug mode that works with several debuggers, including gdb, out of the box. There are also things like DAP-mode. Vim has Vimspector which is pretty decent as well as a debug/gdb mode introduced in vim 8 that I have not tried yet. There is a built int TUI as well, but I haven't tried it too much. There are probably stand alone interfaces available too that I am not aware of.
Hmm it does seem like Emacs is growing support for the Debug Adapter Protocol (DAP), the LSP-alike convention that allows language developers to build language-specific debuggers that tie into the VSCode UI: https://github.com/emacs-lsp/dap-mode
CLion has a good debugging story and is based on gdb/gdbserver.

Emacs has a couple gdb modes which are fine, and a DAP mode which is very good.

I really hope that the Debugger Adapter Protocol (DAP) from Microsoft catches fire like the Language Server Protocol (LSP) did, because I think it would do the same thing to debugging that LSP did to language intelligence/refactoring.

Both vim and neovim have DAP client plugins, but many DAP servers/adapters are not well maintained, so the overall experience isn't great.