diff --git a/platform-includes/debug-symbols-apple/_default.mdx b/platform-includes/debug-symbols-apple/_default.mdx
index 64056ccc29cc7..145cc90695597 100644
--- a/platform-includes/debug-symbols-apple/_default.mdx
+++ b/platform-includes/debug-symbols-apple/_default.mdx
@@ -25,7 +25,13 @@ For this to work, your project settings for `DEBUG_INFORMATION_FORMAT` must be s
-```bash
+You can also upload your code for source context. This feature allows Sentry to display snippets of your code next to the event stack traces.
+
+
+
+```bash {"onboardingOptions": {"source-context": "2"}}
sentry-cli debug-files upload --auth-token ___ORG_AUTH_TOKEN___ \
--include-sources \
--org ___ORG_SLUG___ \
@@ -44,7 +50,7 @@ Sentry can display snippets of your code next to event stack traces. This featur
-```ruby {tabTitle:Current Fastlane plugin}
+```ruby {tabTitle:Current Fastlane plugin} {"onboardingOptions": {"source-context": "5"}}
sentry_debug_files_upload(
auth_token: '___ORG_AUTH_TOKEN___',
org_slug: '___ORG_SLUG___',
@@ -53,7 +59,7 @@ sentry_debug_files_upload(
)
```
-```ruby {tabTitle:Fastlane plugin before 1.20.0}
+```ruby {tabTitle:Fastlane plugin before 1.20.0} {"onboardingOptions": {"source-context": "5"}}
sentry_upload_dif(
auth_token: '___ORG_AUTH_TOKEN___',
org_slug: '___ORG_SLUG___',
@@ -94,7 +100,7 @@ Another option is to use warnings, and then set `GCC_TREAT_WARNINGS_AS_ERRORS` t
-```bash {tabTitle:Warn on failures - nonblocking}
+```bash {tabTitle:Warn on failures - nonblocking} {"onboardingOptions": {"source-context": "10"}}
if [[ "$(uname -m)" == arm64 ]]; then
export PATH="/opt/homebrew/bin:$PATH"
fi
@@ -103,7 +109,9 @@ if which sentry-cli >/dev/null; then
export SENTRY_ORG=___ORG_SLUG___
export SENTRY_PROJECT=___PROJECT_SLUG___
export SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
-ERROR=$(sentry-cli debug-files upload --include-sources "$DWARF_DSYM_FOLDER_PATH" 2>&1 >/dev/null)
+ERROR=$(sentry-cli debug-files upload \
+--include-sources \
+"$DWARF_DSYM_FOLDER_PATH" 2>&1 >/dev/null)
if [ ! $? -eq 0 ]; then
echo "warning: sentry-cli - $ERROR"
fi
@@ -112,7 +120,7 @@ echo "warning: sentry-cli not installed, download from https://github.com/getsen
fi
```
-```bash {tabTitle:Error on failures - blocking}
+```bash {tabTitle:Error on failures - blocking} {"onboardingOptions": {"source-context": "10"}}
if [[ "$(uname -m)" == arm64 ]]; then
export PATH="/opt/homebrew/bin:$PATH"
fi
@@ -121,7 +129,9 @@ if which sentry-cli >/dev/null; then
export SENTRY_ORG=___ORG_SLUG___
export SENTRY_PROJECT=___PROJECT_SLUG___
export SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
-ERROR=$(sentry-cli debug-files upload --include-sources "$DWARF_DSYM_FOLDER_PATH" --force-foreground 2>&1 >/dev/null)
+ERROR=$(sentry-cli debug-files upload \
+--include-sources \
+"$DWARF_DSYM_FOLDER_PATH" --force-foreground 2>&1 >/dev/null)
if [ ! $? -eq 0 ]; then
echo "error: sentry-cli - $ERROR"
fi
diff --git a/src/components/onboarding/index.tsx b/src/components/onboarding/index.tsx
index da581c0da2b70..48f1d90722079 100644
--- a/src/components/onboarding/index.tsx
+++ b/src/components/onboarding/index.tsx
@@ -48,6 +48,15 @@ const optionDetails: Record<
),
},
+ 'source-context': {
+ name: 'Source context',
+ description: (
+
+ Upload your source code to allow Sentry to display snippets of your code next to
+ the event stack traces.
+
+ ),
+ },
};
const OPTION_IDS = [
@@ -55,6 +64,7 @@ const OPTION_IDS = [
'performance',
'profiling',
'session-replay',
+ 'source-context',
] as const;
type OptionId = (typeof OPTION_IDS)[number];