# C++ Error Monitoring

> Prevent crashes across your entire stack with C++ error monitoring. Sentry allows you to debug & resolve issues easily to improve the debugging process.

**URL:** https://sentry.io/for/c-plus-plus/

---

Debug C++ apps and prevent crashes across your entire stack with Sentry. Resolve issues with a C++ monitoring workflow that actually improves the debugging process.

**Documentation:** [https://docs.sentry.io/platforms/native/](https://docs.sentry.io/platforms/native/)

## Install

The Native SDK supports Windows, macOS, and Linux. Download the latest sources from the [Releases page](https://github.com/getsentry/sentry-native/releases) and build them with `CMake`, for example on macOS:

```bash
# configure the CMake build into the `build` directory with crashpad (the default backend on macOS)
cmake -B build -D SENTRY_BACKEND=crashpad -D CMAKE_BUILD_TYPE=RelWithDebInfo
# build the project
cmake --build build --parallel
# install the resulting artifacts into a specific prefix
cmake --install build --prefix install
```

When using the Crashpad backend (the default on Windows, macOS, and Linux), ship the `crashpad_handler` binary alongside your application.

Import and initialize the Sentry SDK early in your application setup:

```cpp
#include <sentry.h>

int main(void) {
  sentry_options_t *options = sentry_options_new();
  sentry_options_set_dsn(options, "https://<key>@<org>.ingest.sentry.io/<project>");
  sentry_options_set_release(options, "my-project-name@2.3.12");
  sentry_init(options);

  /* ... */

  // make sure everything flushes before the application exits
  sentry_close();
}
```

See the [C++ docs](https://docs.sentry.io/platforms/native/) for full setup options.

## Features

### C++ Monitoring with Complete Stack Traces

See details like filename and line numbers so you never have to guess with C++ errors. Filter and group C++ exceptions intuitively to eliminate noise. Monitor errors at scale without impacting throughput in production.

### More Than Just Bug Tracking

Use issue graphs to understand the frequency, scope, and impact of C++ errors so you can prioritize what needs to be fixed. Get alerts via email, SMS, or chat when bugs make it into production without disrupting your development workflow.

### Insights Delivered

Get real-time insights immediately. Setup takes just a few minutes and typically requires only two lines of code. If you need help, we've built a full documentation library to handle any debugging scenario.

---

*Source: [sentry.io/for/c-plus-plus/](https://sentry.io/for/c-plus-plus/)*
