Everyone is welcome, everyone can contribute, everyone is unique and these are your strengths too!

21. Kaeffchen: GitLab with Gitpod, debugging C++ applications with GDB


After exploring Gitpod last week, we decided to try it out with a C++ project. Actually, we created an error situation to try out the GDB debugger.

Gitpod IDE, GitLab and C++ with GDB

Yes, a segfault. After investigating with the terminal based gdb command, we thought about how this integrates into Gitpod itself. And voilà, with the following documentation we were able to integrate GDB on the compiled binary.

  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  "version": "0.2.0",
  "configurations": [
          "type": "gdb",
          "request": "launch",
          "name": "Debug HeyConsole (GDB)",
          "target": "./build/bin/heyconsole",
          "cwd": "${workspaceRoot}",
          "valuesFormatting": "parseText"

In order to compile the repository, you need to do the following in the Gitpod terminal:

mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug


Enjoy the session!



Date published: October 7, 2020