Debugging C++ in Vim

Vim can work with GDB to debug C++ programs. This feature works in Vim version 8.1+. In this blog post, we’ll go through debugging C++ in Vim. Setting Things Up You need to load the plugin using the command: :packadd termdebug You have to do this every time you want to debug. If you want this to happen automatically, add the command to your .vimrc. In vimrc: packadd termdebug The Sample Program The code below is for the sample program that we are going to debug....

November 23, 2020 · 6 min · 1140 words · Timothy Karani