I'm wonder what the absolute most basic way to add a breakpoint into vim is. The equivalent of just 'passing through' the breakthrough line number to gdb, for example:

gdb a.out --ex 'b 9'

I'm hoping there is something as simple as an annotation (similar to the >>> for folding code). All the plugins I have come across seem to create an entire debugging environment inside vim which isn't really what I'm looking for. I'm basically just looking to be able to tag a line as a breakpoint and then to run gdb with those breakpoints automatically added. How can this be done?

  • In the vim source, in vimscript, or some other source code? Please edit – D. Ben Knoble Jan 22 at 12:37
  • 1
    This is actually more complex than it sounds. I would recommend using the termdebug plugin that comes with vim – Christian Brabandt Jan 22 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.