Skip to content
This repository was archived by the owner on Apr 19, 2021. It is now read-only.

Commit b0a717e

Browse files
jamesorlakinsvenefftinge
authored andcommitted
Add clarity around the C++ extension and configuration in use
1 parent bd63941 commit b0a717e

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

src/docs/languages/cpp.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,28 @@ However, if you're missing some additional tools, you can simply run `brew insta
2525

2626
## IDE Features
2727

28+
### Clangd Language Server
29+
30+
Gitpod's native C++ support is currently provided by Theia's native [C++ extension](https://www.npmjs.com/package/@theia/cpp), which builds upon Clangd for out-of-the-box language server support on C++ source files.
31+
32+
More complex projects may need a build system capable of outputting a [`compile_commands.json` file](https://clang.llvm.org/docs/JSONCompilationDatabase.html) before Clangd can work fully.
33+
The extension can be pointed to a directory containing this file as part of a build configuration within Theia's `settings.json`:
34+
35+
```
36+
{
37+
"cpp.buildConfigurations": [
38+
{
39+
"name": "Release",
40+
"directory": "/workspace/project/cmake/release/build"
41+
},
42+
{
43+
"name": "Debug",
44+
"directory": "/workspace/project/cmake/debug/build"
45+
}
46+
]
47+
}
48+
```
49+
2850
### Debugging
2951

3052
Since `gdb` is already pre-installed in Gitpod, you can already debug any C, C++, Go, etc. program directly from the Terminal with a single command.
@@ -63,7 +85,7 @@ Note: This example GDB launch configuration points to a compiled Firefox browser
6385

6486
With this, you should be able to set breakpoints in your C++ code directly from the code editor margin, then start a debugging session from the Debug panel. The IDE should then show you debug information, hopefully pause execution on your breakpoint, and allow you to step through the code.
6587

66-
If that doesn't work, please feel free to ask for help in [community.gitpod.io](https://commnity.gitpod.io) and we'll be happy to help you make debugging work for your project.
88+
If that doesn't work, please feel free to ask for help in [community.gitpod.io](https://community.gitpod.io) and we'll be happy to help you make debugging work for your project.
6789

6890
## Further Reading
6991

0 commit comments

Comments
 (0)