Skip to content

Commit b2d3455

Browse files
jpnurmicoolguyzone
andauthored
feat(native): screenshot capture (windows) (#13064)
* feat(native): screenshot capture (windows) * Tweak the description & drop the alert * Link to Native from the product page for Screenshots * Apply suggestions from code review Co-authored-by: Alex Krawiec <[email protected]> --------- Co-authored-by: Alex Krawiec <[email protected]>
1 parent 2ecbffb commit b2d3455

File tree

5 files changed

+28
-0
lines changed

5 files changed

+28
-0
lines changed
12.6 KB
Loading
756 KB
Loading
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: "Screenshots"
3+
description: "Learn more about taking screenshots when an error occurs. Sentry pairs the screenshot with the original event, giving you additional insight into issues."
4+
---
5+
6+
Sentry makes it possible to automatically take a screenshot and include it as an <PlatformLink to="/enriching-events/attachments/">attachment</PlatformLink> when a user experiences an error, an exception, or a crash.
7+
8+
This feature is currently only available on Windows and has a few limitations. For example, the `inproc` and `breakpad` backends use local exception handlers for capturing the screenshot and therefore rely on the exception handler being called. Only the `crashpad` backend with an external handler process is able to capture screenshots of fast-fail crashes that bypass Structured Exception Handling ([`SEH`](https://learn.microsoft.com/en-us/windows/win32/debug/structured-exception-handling)). Another example where a screenshot might not be available is when the event happens before the screen starts to load. So inherently, this feature is a best effort solution.
9+
10+
## Enabling Screenshots
11+
12+
Because screenshots may contain <PlatformLink to="/data-management/sensitive-data/">PII</PlatformLink>, they are an opt-in feature. You can enable screenshots as shown below:
13+
14+
<PlatformContent includePath="enriching-events/attach-screenshots" />
15+
16+
## Viewing Screenshots
17+
18+
If one is available, you'll see a thumbnail of the screenshot when you click on a specific issue from the [**Issues**](https://demo.sentry.io/issues/) page.
19+
20+
![Screenshot Thumbnail](./img/screenshot-thumbnail.png)
21+
22+
Once you've clicked on the event ID of a specific issue, you'll be able to see an overview of all the attachments as well as associated events in the "Attachments" tab.
23+
24+
![Screenshots List Example](./img/screenshot-list-example.png)

docs/product/issues/issue-details/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ Sentry provides the ability to take a screenshot and include it as an attachment
151151
- [Flutter](/platforms/dart/guides/flutter/enriching-events/screenshots/)
152152
- [iOS](/platforms/apple/guides/ios/enriching-events/screenshots/)
153153
- [JavaScript Electron](/platforms/javascript/guides/electron/enriching-events/screenshots/)
154+
- [Native](/platforms/native/enriching-events/screenshots/)
154155
- [React Native](/platforms/react-native/enriching-events/screenshots/)
155156
- [Unity](/platforms/unity/enriching-events/screenshots/)
156157
- [Unreal Engine](/platforms/unreal/enriching-events/screenshots/)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```c
2+
sentry_options_set_attach_screenshot(options, true);
3+
```

0 commit comments

Comments
 (0)