---
title: "Google Crashpad"
description: "Learn about using Sentry with Google Crashpad."
url: https://docs.sentry.io/platforms/native/guides/crashpad/
last_updated: 2026-12-04T07:25:00.000Z
---

# Sentry for Google Crashpad

[Crashpad](https://chromium.googlesource.com/crashpad/crashpad/+/master/README.md) is an open-source multiplatform crash reporting system written in C++ by Google. It supports macOS, Windows and Linux (limited), and features an uploader to submit minidumps to a configured URL right when the process crashes.

##### important

This page describes **standalone** usage of Crashpad with Sentry. We strongly encourage you to use our [Native SDK](https://docs.sentry.io/platforms/native.md). For detailed information about using Crashpad with the Native SDK, see the [Crashpad backend documentation](https://docs.sentry.io/platforms/native/configuration/backends/crashpad.md).

## [Prerequisites](https://docs.sentry.io/platforms/native/guides/crashpad.md#prerequisites)

You need:

* A Sentry [account](https://sentry.io/signup/) and [project](https://docs.sentry.io/product/projects.md)

## [Install](https://docs.sentry.io/platforms/native/guides/crashpad.md#install)

Follow the [Crashpad developer docs](https://chromium.googlesource.com/crashpad/crashpad/+/HEAD/doc/developing.md) for instructions on how to build Crashpad from source. Make sure that Crashpad's header files are in your include path.

## [Configure](https://docs.sentry.io/platforms/native/guides/crashpad.md#configure)

Sentry supports **Error Monitoring** for Crashpad: it processes the minidumps Crashpad uploads into native crash reports. Tracing, Logs, Application Metrics, and custom attachments aren't available with standalone Crashpad. Use the [Native SDK](https://docs.sentry.io/platforms/native.md) if you need them.

### [Start the Crashpad Handler](https://docs.sentry.io/platforms/native/guides/crashpad.md#start-the-crashpad-handler)

Add a call to [StartHandler()](https://crashpad.chromium.org/doxygen/classcrashpad_1_1CrashpadClient.html#a810ad9941bedba543bf60507c31c55da) during your program startup.

The snippet also sets:

* Release: via the `sentry[release]` annotation, which associates crashes with a [release](https://docs.sentry.io/product/releases.md)
* Environment: via the `sentry[environment]` annotation

Crashpad sends annotations as form fields with each minidump, and Sentry accepts more event attributes in the same format. See [Passing Additional Data](https://docs.sentry.io/platforms/native/guides/minidumps.md#passing-additional-data). Don't need an annotation? Remove it from the snippet.

```cpp
#include <map>
#include <string>
#include <vector>

#include "client/crashpad_client.h"
#include "client/settings.h"

using namespace crashpad;

bool startCrashpad() {
  // Cache directory that will store crashpad information and minidumps
  base::FilePath database("path/to/crashpad/db");
  // Path to the out-of-process handler executable
  base::FilePath handler("path/to/crashpad_handler");
  // URL used to submit minidumps to
  std::string minidump_url("https://o<orgId>.ingest.sentry.io/api/<projectId>/minidump/?sentry_key=<key>");
  // PROXY used for the url
  std::string http_proxy("");
  // Optional annotations passed via --annotations to the handler
  std::map<std::string, std::string> annotations;
  // Associates crashes with a release
  annotations["sentry[release]"] = "my-project-name@2.3.12";
  // Sets the environment, for example production or staging
  annotations["sentry[environment]"] = "production";
  // Optional arguments to pass to the handler
  std::vector<std::string> arguments;

  CrashpadClient client;
  bool success = client.StartHandler(
    handler,
    database,
    database,
    minidump_url,
    http_proxy,
    annotations,
    arguments,
    /* restartable */ true,
    /* asynchronous_start */ false
  );

  return success;
}
```

This method directs crashes to the Crashpad handler. On macOS, this is applicable to this process and all subsequent child processes. On other platforms, child processes must also register by using [SetHandlerIPCPipe()](https://crashpad.chromium.org/doxygen/classcrashpad_1_1CrashpadClient.html#a9f1d5d38e9b4f5781e3821551dcc39d5). For more information on configuring the Crashpad handler, see [crashpad\_handler](https://chromium.googlesource.com/crashpad/crashpad/+/HEAD/handler/crashpad_handler.md).

### [Enable Uploads](https://docs.sentry.io/platforms/native/guides/crashpad.md#enable-uploads)

For Crashpad to upload crashes to Sentry, configure the Crashpad database for automatic uploads:

```cpp
// #include "client/crash_report_database.h"

base::FilePath database("path/to/crashpad/db");
std::unique_ptr<CrashReportDatabase> db =
    crashpad::CrashReportDatabase::Initialize(database);

if (db != nullptr && db->GetSettings() != nullptr) {
  db->GetSettings()->SetUploadsEnabled(true);
}
```

By default, the Crashpad handler limits uploads to one per hour. To disable this limit, pass the `--no-rate-limit` argument to the handler:

```cpp
arguments.push_back("--no-rate-limit");
```

### [Add Readable Stack Traces With Debug Information Files](https://docs.sentry.io/platforms/native/guides/crashpad.md#add-readable-stack-traces-with-debug-information-files)

To see symbolicated stack traces, upload your application's debug information files to Sentry. See [Uploading Debug Information Files](https://docs.sentry.io/platforms/native/guides/crashpad/data-management/debug-files/upload.md) for how to do this with the Sentry CLI.

## [Verify Your Setup](https://docs.sentry.io/platforms/native/guides/crashpad.md#verify-your-setup)

Let's test your setup and confirm that Sentry is working correctly and sending data to your Sentry project.

Trigger a crash after `StartHandler()` returns, for example with a null pointer write:

```cpp
// Intentional crash to test your setup
volatile int *ptr = nullptr;
*ptr = 42;
```

The Crashpad handler writes a minidump and uploads it to Sentry. If you didn't disable the rate limit, the handler sends at most one crash per hour.

### [View Captured Data in Sentry](https://docs.sentry.io/platforms/native/guides/crashpad.md#view-captured-data-in-sentry)

Now, head over to the [Issues page](https://sentry.io/orgredirect/organizations/:orgslug/issues/) in your project to view the collected data (it takes a couple of moments for the data to appear). For more details, see the [Issue Details](https://docs.sentry.io/product/issues/issue-details.md) documentation.

## [Next Steps](https://docs.sentry.io/platforms/native/guides/crashpad.md#next-steps)

At this point, you should have integrated Crashpad with Sentry. Here's what to explore next:

* Explore [practical guides](https://docs.sentry.io/get-started/guides.md) on what to monitor, log, track, and investigate after setup
* Learn more about [Minidumps](https://docs.sentry.io/platforms/native/guides/minidumps.md), including size limits and storing minidumps as attachments
* Use the [Native SDK with the Crashpad backend](https://docs.sentry.io/platforms/native/configuration/backends/crashpad.md) to add tracing, logs, metrics, and attachments

Are you having problems setting up the SDK or integration?

* [Get support](https://www.sentry.help/en/)

## Other Native Frameworks

- [Google Breakpad](https://docs.sentry.io/platforms/native/guides/breakpad.md)
- [Minidumps](https://docs.sentry.io/platforms/native/guides/minidumps.md)
- [Qt](https://docs.sentry.io/platforms/native/guides/qt.md)
- [WebAssembly](https://docs.sentry.io/platforms/native/guides/wasm.md)

## Topics

- [Data Management](https://docs.sentry.io/platforms/native/guides/crashpad/data-management.md)
- [Security Policy Reporting](https://docs.sentry.io/platforms/native/guides/crashpad/security-policy-reporting.md)
- [Debug Information](https://docs.sentry.io/platforms/native/guides/crashpad/debug-information.md)

---

Find other pages: [Sitemap](https://docs.sentry.io/sitemap.md) lists every page with a one-line summary, and [llms.txt](https://docs.sentry.io/llms.txt) gives an overview with guidance for agents.
