4 ms·
On Emacs the GUD major mode, makes using GDB from the GUI quite convenient. Does VIM has anything similar?
by billfruit 5y ago
On Emacs the GUD major mode, makes using GDB from the GUI quite convenient.
Does VIM has anything similar?
- kmarc 5y agoYes. https://news.ycombinator.com/item?id=30760084 https://news.ycombinator.com/item?id=30760084 There is also vimspector, which is more advanced, a full blown debugging solution, using LSP and its lesser known cousin, the debugger adapter protocol. However, its quite hard to set up and success isn't guaranteed.
- adaszko 5y agoThis article goes into a little more detail which may be useful: https://www.dannyadam.com/blog/2019/05/debugging-in-vim/ https://www.dannyadam.com/blog/2019/05/debugging-in-vim/
- israrkhan 5y agoif you are using neovim, nvim-dap has support for debug adapters, which includes gdb in addition to several other languages (python, nodejs, java etc). Here [1] are available debug adapters. It is noteable that nvim-dap just provides support for debug adapters, if you are looking for nice UI, there are other plugins such as nvim-dap-ui [2]. In vim land, there is vimspector. I have not used vimspector myself, but from what I hear, it is slower than nvim-dap. [1] https://microsoft.github.io/debug-adapter-protocol/implementors/adapters/ https://microsoft.github.io/debug-adapter-protocol/implement... [2] https://github.com/rcarriga/nvim-dap-ui https://github.com/rcarriga/nvim-dap-ui