All Projects → sakhnik → Nvim Gdb

sakhnik / Nvim Gdb

Neovim thin wrapper for GDB, LLDB, PDB/PDB++ and BashDB

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Nvim Gdb

Gdbprofiler
Rich man's profiler, a profiler for native OCaml and other executables
Stars: ✭ 75 (-78.01%)
Mutual labels:  gdb, lldb
Inspector
A drop-anywhere C++ REPL
Stars: ✭ 767 (+124.93%)
Mutual labels:  gdb, lldb
Lldb
Project moved to: https://github.com/llvm/llvm-project
Stars: ✭ 412 (+20.82%)
Mutual labels:  gdb, lldb
OpenImageDebugger
An advanced in-memory image visualization plugin for GDB and LLDB on Linux, MacOS and Windows (experimental). Previously known as gdb-imagewatch.
Stars: ✭ 115 (-66.28%)
Mutual labels:  gdb, lldb
gdbundle
Minimalist plugin manager for GDB and LLDB
Stars: ✭ 72 (-78.89%)
Mutual labels:  gdb, lldb
Neogdb.vim
## Project deprecated in favor of: new.vim + new-gdb.vim
Stars: ✭ 78 (-77.13%)
Mutual labels:  gdb, neovim
Voltron
A hacky debugger UI for hackers
Stars: ✭ 5,599 (+1541.94%)
Mutual labels:  gdb, lldb
Code Debug
Native debugging for VSCode
Stars: ✭ 232 (-31.96%)
Mutual labels:  gdb, lldb
lldbg
A lightweight native GUI for LLDB.
Stars: ✭ 83 (-75.66%)
Mutual labels:  gdb, lldb
Lldb.nvim
Debugger integration with a focus on ease-of-use.
Stars: ✭ 254 (-25.51%)
Mutual labels:  lldb, neovim
Vimtex
VimTeX: A modern Vim and neovim filetype plugin for LaTeX files.
Stars: ✭ 3,609 (+958.36%)
Mutual labels:  neovim
Nvimux
Neovim as a TMUX replacement
Stars: ✭ 302 (-11.44%)
Mutual labels:  neovim
Tailwindcss Classnames
TypeScript support for TailwindCSS
Stars: ✭ 305 (-10.56%)
Mutual labels:  neovim
Rigel
🌌 Colorscheme for vim, terminal, vscode and slack - based on the star Rigel ✨.
Stars: ✭ 324 (-4.99%)
Mutual labels:  neovim
Spaceduck
🚀 🦆 An intergalactic space theme for Vim, Terminal, and more!
Stars: ✭ 177 (-48.09%)
Mutual labels:  neovim
Vimpyter
Edit your Jupyter notebooks in Vim/Neovim
Stars: ✭ 308 (-9.68%)
Mutual labels:  neovim
Blamer.nvim
A git blame plugin for neovim inspired by VS Code's GitLens plugin
Stars: ✭ 283 (-17.01%)
Mutual labels:  neovim
Gen tags.vim
Async plugin for vim and neovim to ease the use of ctags/gtags
Stars: ✭ 288 (-15.54%)
Mutual labels:  neovim
Vim Colors Github
A Vim colorscheme based on Github's syntax highlighting as of 2018.
Stars: ✭ 286 (-16.13%)
Mutual labels:  neovim
Biopandas
Working with molecular structures in pandas DataFrames
Stars: ✭ 329 (-3.52%)
Mutual labels:  pdb

Test Codacy Badge

GDB for neovim

Gdb, LLDB, pdb/pdb++ and BASHDB integration with NeoVim.

Table of contents

Overview

Taken from the neovim: neovim_gdb.vim

It is instantly usable: type <leader>dd, edit GDB launching command, hit <cr>. Or type <leader>dl to do the same with LLDB backend. Or type <leader>dp to start debugging a python program. Or type <leader>db to start debugging a BASH script.

nvim-gdb

Installation

Check the prerequisites in the script test/prerequisites.sh.

If you use vim-plug, add the following line to your vimrc file:

Plug 'sakhnik/nvim-gdb', { 'do': ':!./install.sh' }

NOTE: Make sure to run :UpdateRemotePlugins and restart the editor before using the plugin.

You can use any other plugin manager too:

  • vundle
  • neobundle
  • pathogen

Options

To disable the plugin

let g:loaded_nvimgdb = 1

The behaviour of the plugin can be tuned by defining specific variables. For instance, you could overload some command keymaps:

" We're going to define single-letter keymaps, so don't try to define them
" in the terminal window.  The debugger CLI should continue accepting text commands.
function! NvimGdbNoTKeymaps()
  tnoremap <silent> <buffer> <esc> <c-\><c-n>
endfunction

let g:nvimgdb_config_override = {
  \ 'key_next': 'n',
  \ 'key_step': 's',
  \ 'key_finish': 'f',
  \ 'key_continue': 'c',
  \ 'key_until': 'u',
  \ 'key_breakpoint': 'b',
  \ 'set_tkeymaps': "NvimGdbNoTKeymaps",
  \ }

Likewise, you could define your own hooks to be called when the source window is entered and left. Please refer to the online NeoVim help: :help nvimgdb.

Usage

See :help nvimgdb for the complete online documentation. Most notable commands:

Mapping Command Description
<Leader>dd :GdbStart gdb -q ./a.out Start debugging session, allows editing the launching command
<Leader>dl :GdbStartLLDB lldb ./a.out Start debugging session, allows editing the launching command
<Leader>dp :GdbStartPDB python -m pdb main.py Start Python debugging session, allows editing the launching command
<Leader>db :GdbStartBashDB bashdb main.sh Start BASH debugging session, allows editing the launching command
<F8> :GdbBreakpointToggle Toggle breakpoint in the coursor line
<F4> :GdbUntil Continue execution until a given line (until in gdb)
<F5> :GdbContinue Continue execution (continue in gdb)
<F10> :GdbNext Step over the next statement (next in gdb)
<F11> :GdbStep Step into the next statement (step in gdb)
<F12> :GdbFinish Step out the current frame (finish in gdb)
<c-p> :GdbFrameUp Navigate one frame up (up in gdb)
<c-n> :GdbFrameDown Navigate one frame down (down in gdb)

You can create a watch window evaluating a backend command on every step. Try :GdbCreateWatch info locals in GDB, for istance.

You can open the list of breakpoints or backtrace locations into the location list. Try :GdbLopenBacktrace or :GdbLopenBreakpoints.

Development

The goal is to have a thin wrapper around GDB, LLDB, pdb/pdb++ and BASHDB, just like the official TUI. NeoVim will enhance debugging with syntax highlighting and source code navigation.

The project uses GitHub actions to run the test suite on every commit automatically. The plugin, proxy and screen logs can be downloaded as the artifacts to be analyzed locally.

References

Showcase

nvim-gdb + llvm

clone + deploy + test

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].