# 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 an 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, Linux, and Android. `CMake` can be used like this (on macOS):

```bash
# configure the cmake build into the `build` directory, with crashpad (on macOS)
cmake -B build -D SENTRY_BACKEND=crashpad --config RelWithDebInfo 
# build the project
cmake --build build --config RelWithDebInfo --parallel
# install the resulting artifacts into a specific prefix
cmake --install build --prefix install
# which will result in the following (on macOS):
exa --tree install
```

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

```c
#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
  sentry_shutdown();
}
```

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/)*
