Example Repositories
Here are a few C++ example projects that are already automated with Gitpod:Repository | Description | Try it |
---|---|---|
Component Editor | circuito.io Component Editor | |
tinyraycaster | old-school FPS in a weekend | |
HelloGitPod | Example Gitpod C++ configuration with clang-tidy linter enabled |
Environment
C++ Tools
All Gitpod workspaces come with the latest availableclang
, gcc
, cmake
, gdb
, and other useful C++ tools pre-installed by default.
However, if you’re missing some additional tools, you can simply run brew install <tool_name>
to install it in the current workspace or write your own .gitpod.Dockerfile to install it across all workspaces for your repository.
IDE Features
Debugging
Sincegdb
is already pre-installed in Gitpod, you can already debug any C, C++, Go, etc. program directly from the Terminal with a single command.
However, you can also get the IDE’s Debugging features to work with your C++ program, using GDB as a backend.
To enable C++ debugging for your project, simply follow these steps:
- Open the Extensions panel (in the IDE’s left vertical menu bar)
-
Use the Search feature to find the extension called “Native Debug”, then click on
Install
, and selectInstall for this project
-
Next, open the Debug panel (also in the IDE’s left vertical menu bar), and click on the Gear (⚙️) icon to open the
launch.json
configuration file -
Finally, configure debugging for your project by adding a GDB launch configuration. You can use auto-completion for assistance. In the end, your
launch.json
should look something like this: