> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coderide.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# C / C++

> LSP and debugger setup for C and C++ in Coder.

## Language server

| Server | Install |
| - | - |
| [clangd](https://clangd.llvm.org/) | `brew install llvm` |

**clangd gotcha:** `brew install llvm` is keg-only on macOS, it doesn't link `clangd` onto `PATH`. Coder checks `/opt/homebrew/opt/llvm/bin` (Apple Silicon) and `/usr/local/opt/llvm/bin` (Intel) directly, so no `PATH` changes are needed. For accurate diagnostics on anything beyond a single file, clangd also needs a `compile_commands.json` in the project root, generate one via CMake (`-DCMAKE_EXPORT_COMPILE_COMMANDS=ON`) or `bear`/`compiledb` for Makefile-based projects.

## Debugger

| Adapter | Install | Notes |
| - | - | - |
| [lldb-dap](https://lldb.llvm.org/) | Ships with Xcode Command Line Tools, or `brew install llvm` | Same adapter as Rust/Zig/Swift. Requires a binary already built with debug symbols (`gcc`/`clang -g`), Coder does not build it for you, and there's no standard output path to guess, so point "Program" at your binary directly. |

`brew install llvm`'s `lldb-dap` isn't linked onto `PATH` by default on macOS, you may need to add `$(brew --prefix llvm)/bin` to your `PATH`, or symlink it into `/opt/homebrew/bin`.

See [Debugger](/debugger) for the debugger UI itself.

## Tested on

macOS (Apple Silicon). Windows and Linux paths aren't documented yet, on Linux, `clangd`/`lldb-dap` from your distro's LLVM package should follow the same plain-`PATH` resolution without the Homebrew keg-only workaround.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.