cgdb/cgdb logo

cgdb/cgdb

Free

Console front-end to the GNU debugger

FreeFree tier
Type
Open Source

About cgdb/cgdb

CGDB is a lightweight, console-based frontend for the GNU Debugger (GDB) that provides a split-screen interface: the program's source code is displayed in an upper panel while the interactive GDB session runs below. The interface is modeled after the Vim text editor, making it immediately familiar to Vim users. CGDB is written in C/C++ and is distributed under the GPL-2.0 license. It supports real-time source code display during debugging, allowing developers to step through code without leaving the terminal. The tool is ideal for developers who prefer a keyboard-driven, terminal-based workflow for debugging C and C++ programs.

Key Features

Split-screen interface displaying source code and GDB session simultaneously
Vim-inspired keybindings for navigation and control
Lightweight and fast, running entirely in the terminal
Real-time source code highlighting and line tracking during debugging
Open source under GPL-2.0 license

Pros & Cons

Pros
  • Extremely lightweight compared to graphical debuggers like DDD or IDE-integrated debuggers
  • Vim-like interface reduces learning curve for Vim users
  • Eliminates the need to switch between terminal and editor while debugging
  • Free and open source with active maintenance on GitHub
Cons
  • Requires GDB to be installed and a terminal environment
  • Vim-centric keybindings may be unfamiliar to users accustomed to other editors
  • No graphical visualization of data structures or memory (text-only)
  • Manual compilation from source required; no prebuilt binaries for all platforms

Best For

Debugging C and C++ applications without a graphical IDEUsing GDB with a visual source code overlay in terminal environmentsLearning and teaching GDB with an intuitive split-screen viewRemote debugging via SSH or over serial connections where GUI is unavailable