https://github.com/alexsutila/breakqf.vim
GDB QoL, read breakpoint locations from GDB into vim's native quickfix list for easy navigation during debugging
https://github.com/alexsutila/breakqf.vim
gdb neovim neovim-plugin vim vim-plugin
Last synced: 2 months ago
JSON representation
GDB QoL, read breakpoint locations from GDB into vim's native quickfix list for easy navigation during debugging
- Host: GitHub
- URL: https://github.com/alexsutila/breakqf.vim
- Owner: AlexSutila
- Created: 2025-09-05T02:32:20.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2025-09-05T05:55:06.000Z (10 months ago)
- Last Synced: 2025-09-05T06:06:56.544Z (10 months ago)
- Topics: gdb, neovim, neovim-plugin, vim, vim-plugin
- Language: Vim Script
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## BreakQF
Short for **"breakpoint quickfix"**. Easily navigate between [gdb](https://www.gnu.org/savannah-checkouts/gnu/gdb/index.html) breakpoints leveraging vim's native quickfix and tag lists. This plugin should be universal, as long as the target language is supported by both [gdb](https://www.gnu.org/savannah-checkouts/gnu/gdb/index.html) and [ctags](https://github.com/universal-ctags/ctags).

*****
### Usage
There is kind of an assumption you know how both the quickfix list and taglists already work when using this plugin. That being said this basic plugin provides two commands:
##### Creating tagfile
```
:Mktags
```
- Is a simple wrapper which invokes ctags with the necessary arguments for this plugin to function as intended.
##### Reading breakpoints
```
:ReadBreakpoints
```
- Is a command which will read the breakpoints from the provided file into the quickfix list.
The breakpoints file is a pre-requisite for running this command. It can be generated within [gdb](https://www.gnu.org/savannah-checkouts/gnu/gdb/index.html) by running the following command:
```
(gdb) save breakpoints
```
##### Writing breakpoints
```
:WriteBreakpoint
```
- Is a command which will write the line under the cursor as a breakpoint to the specified file.
The breakpoints file can be either sourced or re-sourced within [gdb](https://www.gnu.org/savannah-checkouts/gnu/gdb/index.html) after running this command. This can be done by running the following command:
```
(gdb) source
```
After running `ReadBreakpoints` you can use the quickfix list as you traditionally would to navigate between breakpoints.
- `cnext`
- `cprev`
- `copen` (or `cope` if ur based lol)
It will come intuitively if you are already good with the quickfix list.
### Why
It is a subtle but nice thing to have as somebody who spends an enormous amount of time going back and fourth between **vim** and **gdb** during remote work I do through ssh.
The primary reason I write this in **vimscript** and not **lua** is so that it has backwards compatability with vim and older versions when you don't want to be arbitrarily installing editors on other servers *(I'm looking at you neovim elitists)*.
### Todo
- Potentially support a configurable default `breakpoints.txt` that is selected implicitly when no argument is provided.
- Tests.
- Other ideas are welcome as well.