{"componentChunkName":"component---src-templates-platform-tsx","path":"/platforms/native/backends/crashpad/","result":{"data":{"file":{"id":"e9d81b86-8647-5e6e-9d32-23ce9466f24a","relativePath":"native/backends/crashpad.mdx","sourceInstanceName":"platforms","childMarkdownRemark":null,"childMdx":{"body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"Crashpad\"\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar CodeTabs = makeShortcode(\"CodeTabs\");\nvar CodeBlock = makeShortcode(\"CodeBlock\");\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://chromium.googlesource.com/crashpad/crashpad/+/master/README.md\"\n  }), \"Crashpad\"), \"\\nis an open-source multiplatform crash reporting system written in C++ by Google.\\nIt supports macOS, Windows, and Linux, and features an uploader to\\nsubmit Minidumps to a configured URL right when the process crashes.\"), mdx(\"p\", null, \"To use the Crashpad backend with the Native SDK, configure the CMake build\\nwith the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"SENTRY_BACKEND=crashpad\"), \" option. This will automatically create a\\n\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"crashpad_handler\"), \" executable alongside the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"sentry\"), \" library.\"), mdx(\"div\", {\n    \"className\": \"code-tabs-wrapper\"\n  }, mdx(CodeTabs, {\n    mdxType: \"CodeTabs\"\n  }, mdx(CodeBlock, {\n    language: \"shell\",\n    title: \"\",\n    filename: \"\",\n    mdxType: \"CodeBlock\"\n  }, mdx(\"div\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"shell\"\n  }), mdx(\"pre\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"language-shell\"\n  }), mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-shell\"\n  }), \"cmake -B build -D \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token assign-left variable\"\n  }), \"SENTRY_BACKEND\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token operator\"\n  }), \"=\"), \"crashpad\")))))), mdx(\"p\", null, \"The SDK will automatically look for a \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"crashpad_handler\"), \" executable in the same\\ndirectory as the running application. It will also use the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \".sentry-native\"), \"\\ndirectory as its database by default, relative to the current working directory\\nof your application.\\nThis location temporarily hosts Minidumps before they are uploaded to Sentry.\"), mdx(\"p\", null, \"Both of these paths can be customized like this:\"), mdx(\"div\", {\n    \"className\": \"code-tabs-wrapper\"\n  }, mdx(CodeTabs, {\n    mdxType: \"CodeTabs\"\n  }, mdx(CodeBlock, {\n    language: \"c\",\n    title: \"\",\n    filename: \"\",\n    mdxType: \"CodeBlock\"\n  }, mdx(\"div\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"c\"\n  }), mdx(\"pre\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"language-c\"\n  }), mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-c\"\n  }), \"sentry_options_t \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token operator\"\n  }), \"*\"), \"options \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token operator\"\n  }), \"=\"), \" \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token function\"\n  }), \"sentry_options_new\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"(\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \")\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \";\"), \"\\n\", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token function\"\n  }), \"sentry_options_set_handler_path\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"(\"), \"options\", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \",\"), \" \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token string\"\n  }), \"\\\"path/to/crashpad_handler\\\"\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \")\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \";\"), \"\\n\", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token function\"\n  }), \"sentry_options_set_database_path\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"(\"), \"options\", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \",\"), \" \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token string\"\n  }), \"\\\"sentry-db-directory\\\"\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \")\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \";\"), \"\\n\", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token function\"\n  }), \"sentry_init\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"(\"), \"options\", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \")\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \";\"))))))), mdx(\"p\", null, \"The crashpad handler executable must be shipped alongside your application so\\nthat it can be launched when initializing the SDK. The path is evaluated\\naccording to shell lookup rules at runtime.\"), mdx(\"p\", null, \"It is advised to specify both the path to the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"crashpad_handler\"), \" executable\\nas well as the path to the database directory manually.\"), mdx(\"h2\", {\n    \"id\": \"known-limitations\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#known-limitations\",\n    \"aria-label\": \"known limitations permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), \"Known Limitations\"), mdx(\"p\", null, \"When using the Crashpad backend on macOS, the duration and status of crashes sessions can not be reliably determined, and may be classified as \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"/product/releases/health/#release-details\"\n  }), mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"abnormal\")), \" exits instead.\"));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#known-limitations","title":"Known Limitations"}]},"internal":{"type":"Mdx"}}}},"pageContext":{"excerpt":"Crashpad \nis an open-source multiplatform crash reporting system written in C++ by Google.\nIt supports macOS, Windows, and Linux, and features an uploader to\nsubmit Minidumps to a configured URL right when the process crashes. To use the Crashpad backend with the Native SDK, configure the CMake build\nwith the  SENTRY_BACKEND=crashpad  option. This will automatically create a\n crashpad_handler  executable alongside the  sentry  library. The SDK will automatically look for a  crashpad_handler  executable in the same\ndirectory as the running application. It will also use the  .sentry-native \ndirectory as its database by default, relative to the current working directory\nof your application.\nThis location temporarily hosts Minidumps before they are uploaded to Sentry. Both of these paths can be customized like this: The crashpad handler executable must be shipped alongside your application so\nthat it can be launched when initializing the SDK. The path is evaluated\naccording to shell lookup rules at runtime. It is advised to specify both the path to the  crashpad_handler  executable\nas well as the path to the database directory manually. Known Limitations When using the Crashpad backend on macOS, the duration and status of crashes sessions can not be reliably determined, and may be classified as  abnormal  exits instead.","title":"Crashpad","platform":{"name":"native","title":"Native"},"id":"e9d81b86-8647-5e6e-9d32-23ce9466f24a"}},"staticQueryHashes":["1218203755","1222113826","1222113826","1766336459","2158593473","2404336828","2472290386","2764967025","3818502851","4015007367","4192517163","4264099332","518019976"]}