Skip to content

Commit 27c162e

Browse files
committed
extend onboarding component
- extend onboarding component - remove custom impl for debug symbols - combine bash scripts for building flutter app, with tabs for variation
1 parent d0b7b34 commit 27c162e

File tree

6 files changed

+112
-192
lines changed

6 files changed

+112
-192
lines changed

platform-includes/debug-symbols/dart-plugin/dart.mdx

Lines changed: 55 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,30 @@ dev_dependencies:
1111
1212
The Sentry Dart Plugin requires basic configuration in your `pubspec.yaml` file:
1313

14-
<DebugSymbolConfig />
14+
<OnboardingOptionButtons
15+
options={[
16+
{id: 'dsym', checked: true, disabled: true},
17+
'source-context',
18+
'source-maps'
19+
]}
20+
/>
21+
22+
```yaml {filename:pubspec.yaml} {"onboardingOptions": {"source-context": "7-8", "source-maps": "9-10"}}
23+
sentry:
24+
project: ___PROJECT_SLUG___
25+
org: ___ORG_SLUG___
26+
auth_token: ___ORG_AUTH_TOKEN___
27+
# Disable automatic upload of debug symbols
28+
# upload_debug_symbols: false
29+
# Enable source context
30+
upload_source_context: true
31+
# Enable source maps
32+
upload_source_maps: true
33+
```
34+
35+
<OnboardingOption optionId="dsym">
36+
The `upload_debug_symbols` option defaults to `true` when not specified.
37+
</OnboardingOption>
1538

1639
### Alternative Configuration Methods
1740

@@ -23,40 +46,37 @@ For more information, read the [Sentry Dart Plugin README](https://github.com/ge
2346

2447
## Building Your Application
2548

26-
Before running the plugin, build your application with one of the following commands:
27-
28-
### Standard Build
29-
30-
```bash
31-
flutter build apk
32-
flutter build ios
33-
flutter build macos
34-
```
35-
36-
### Obfuscated Build (Recommended for Production)
37-
38-
Include the `--obfuscate` flag with the `--split-debug-info` option:
49+
Before running the plugin, build your Flutter application with one of the following commands. Obuscated is encouraged for production builds, and will make uploading debug symbols necessary to get readable stack traces.
3950

40-
```bash
51+
```bash {tabTitle: Obfuscated}
4152
flutter build apk --obfuscate --split-debug-info=<output-directory>
4253
flutter build ios --obfuscate --split-debug-info=<output-directory>
4354
flutter build macos --obfuscate --split-debug-info=<output-directory>
55+
flutter build windows --obfuscate --split-debug-info=<output-directory>
56+
flutter build linux --obfuscate --split-debug-info=<output-directory>
4457
```
4558

46-
### Flutter Web
47-
48-
For Flutter Web, generate source maps:
59+
```bash {tabTitle: Standard}
60+
flutter build apk
61+
flutter build ios
62+
flutter build macos
63+
flutter build windows
64+
flutter build linux
65+
```
4966

50-
```bash
67+
```bash {tabTitle: Flutter Web}
5168
flutter build web --release --source-maps
5269
```
70+
<Alert>
71+
For Flutter web run `flutter build web --release --source-maps` to generate source maps.
72+
</Alert>
5373

5474
## Running the Plugin
5575

5676
After building your application, run the plugin to upload debug symbols:
5777

5878
```bash
59-
flutter packages pub run sentry_dart_plugin
79+
flutter pub run sentry_dart_plugin
6080
```
6181

6282
<Alert>
@@ -95,6 +115,20 @@ Sentry's Flutter SDK doesn't currently support the `uploadNativeSymbols` flag fr
95115

96116
</Alert>
97117

118+
## iOS and macOS dSYM Uploads
119+
120+
For iOS and macOS applications, you need to upload dSYM files. The Sentry Dart Plugin will automatically handle this when you build with the `--obfuscate` flag.
121+
122+
For non-obfuscated builds or additional configuration options, you can:
123+
124+
1. **Use the Sentry Cocoa script**
125+
126+
Follow the [Sentry Cocoa debug symbols guide](/platforms/apple/guides/ios/dsym/) to set up automatic dSYM uploads with the script.
127+
128+
2. **Use the Sentry CLI**
129+
130+
Use the [Sentry CLI](/platforms/apple/guides/ios/dsym/#upload-dsyms-with-cli) to manually upload dSYM files.
131+
98132
## Configuration Reference
99133

100134
The following table lists all available configuration options for the Sentry Dart Plugin:
@@ -125,4 +159,4 @@ The following table lists all available configuration options for the Sentry Dar
125159

126160
## Troubleshooting
127161

128-
If you encounter any issues with the Sentry Dart Plugin, refer to [Troubleshooting - Sentry Dart Plugin](/platforms/dart/guides/flutter/troubleshooting#sentry-dart-plugin) for solutions to common problems.
162+
If you encounter any issues with the Sentry Dart Plugin, refer to [Troubleshooting - Sentry Dart Plugin](/platforms/dart/guides/flutter/troubleshooting#sentry-dart-plugin) for solutions to common problems.

platform-includes/debug-symbols/dart-plugin/flutter.mdx

Lines changed: 38 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,30 @@ dev_dependencies:
1111
1212
The Sentry Dart Plugin requires basic configuration in your `pubspec.yaml` file:
1313

14-
<DebugSymbolConfig />
14+
<OnboardingOptionButtons
15+
options={[
16+
{id: 'dsym', checked: true, disabled: true},
17+
'source-context',
18+
'source-maps'
19+
]}
20+
/>
21+
22+
```yaml {filename:pubspec.yaml} {"onboardingOptions": {"source-context": "7-8", "source-maps": "9-10"}}
23+
sentry:
24+
project: ___PROJECT_SLUG___
25+
org: ___ORG_SLUG___
26+
auth_token: ___ORG_AUTH_TOKEN___
27+
# Disable automatic upload of debug symbols
28+
# upload_debug_symbols: false
29+
# Enable source context
30+
upload_source_context: true
31+
# Enable source maps
32+
upload_source_maps: true
33+
```
34+
35+
<OnboardingOption optionId="dsym">
36+
The `upload_debug_symbols` option defaults to `true` when not specified.
37+
</OnboardingOption>
1538

1639
### Alternative Configuration Methods
1740

@@ -23,37 +46,30 @@ For more information, read the [Sentry Dart Plugin README](https://github.com/ge
2346

2447
## Building Your Application
2548

26-
Before running the plugin, build your Flutter application with one of the following commands:
27-
28-
### Standard Build
29-
30-
```bash
31-
flutter build apk
32-
flutter build ios
33-
flutter build macos
34-
flutter build windows
35-
flutter build linux
36-
```
37-
38-
### Obfuscated Build (Recommended for Production)
49+
Before running the plugin, build your Flutter application with one of the following commands. Obuscated is encouraged for production builds, and will make uploading debug symbols necessary to get readable stack traces.
3950

40-
Include the `--obfuscate` flag with the `--split-debug-info` option:
41-
42-
```bash
51+
```bash {tabTitle: Obfuscated}
4352
flutter build apk --obfuscate --split-debug-info=<output-directory>
4453
flutter build ios --obfuscate --split-debug-info=<output-directory>
4554
flutter build macos --obfuscate --split-debug-info=<output-directory>
4655
flutter build windows --obfuscate --split-debug-info=<output-directory>
4756
flutter build linux --obfuscate --split-debug-info=<output-directory>
4857
```
4958

50-
### Flutter Web
51-
52-
For Flutter Web, generate source maps:
59+
```bash {tabTitle: Standard}
60+
flutter build apk
61+
flutter build ios
62+
flutter build macos
63+
flutter build windows
64+
flutter build linux
65+
```
5366

54-
```bash
67+
```bash {tabTitle: Flutter Web}
5568
flutter build web --release --source-maps
5669
```
70+
<Alert>
71+
For Flutter web run `flutter build web --release --source-maps` to generate source maps.
72+
</Alert>
5773

5874
## Running the Plugin
5975

@@ -143,4 +159,4 @@ The following table lists all available configuration options for the Sentry Dar
143159

144160
## Troubleshooting
145161

146-
If you encounter any issues with the Sentry Dart Plugin, refer to [Troubleshooting - Sentry Dart Plugin](/platforms/dart/guides/flutter/troubleshooting#sentry-dart-plugin) for solutions to common problems.
162+
If you encounter any issues with the Sentry Dart Plugin, refer to [Troubleshooting - Sentry Dart Plugin](/platforms/dart/guides/flutter/troubleshooting#sentry-dart-plugin) for solutions to common problems.

src/components/debugSymbolConfig/debugSymbolConfig.tsx

Lines changed: 0 additions & 145 deletions
This file was deleted.

src/components/debugSymbolConfig/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/components/onboarding/index.tsx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,30 @@ const optionDetails: Record<
5151
),
5252
},
5353
'source-context': {
54-
name: 'Source context',
54+
name: 'Source Context',
5555
description: (
5656
<span>
5757
Upload your source code to allow Sentry to display snippets of your code next to
5858
the event stack traces.
5959
</span>
6060
),
6161
},
62+
'dsym': {
63+
name: 'dSYM',
64+
description: (
65+
<span>
66+
Debug symbols for iOS and macOS that provide the necessary information to convert program addresses back to function names, source file names, and line numbers.
67+
</span>
68+
),
69+
},
70+
'source-maps': {
71+
name: 'Source Maps',
72+
description: (
73+
<span>
74+
Source maps for web applications that help translate minified code back to the original source for better error reporting.
75+
</span>
76+
),
77+
},
6278
opentelemetry: {
6379
name: 'OpenTelemetry',
6480
description: <span>Combine Sentry with OpenTelemetry.</span>,
@@ -71,6 +87,8 @@ const OPTION_IDS = [
7187
'profiling',
7288
'session-replay',
7389
'source-context',
90+
'dsym',
91+
'source-maps',
7492
'opentelemetry',
7593
] as const;
7694

0 commit comments

Comments
 (0)