@@ -25,7 +25,13 @@ For this to work, your project settings for `DEBUG_INFORMATION_FORMAT` must be s
2525
2626<OrgAuthTokenNote />
2727
28- ``` bash
28+ 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.
29+
30+ <OnboardingOptionButtons
31+ options = { [{ id:" source-context" , checked: false }]}
32+ />
33+
34+ ``` bash {"onboardingOptions": {"source-context": "2"}}
2935sentry-cli debug-files upload --auth-token ___ORG_AUTH_TOKEN___ \
3036 --include-sources \
3137 --org ___ORG_SLUG___ \
@@ -44,7 +50,7 @@ Sentry can display snippets of your code next to event stack traces. This featur
4450
4551<OrgAuthTokenNote />
4652
47- ``` ruby {tabTitle:Current Fastlane plugin}
53+ ``` ruby {tabTitle:Current Fastlane plugin} {"onboardingOptions": {"source-context": "5"}}
4854sentry_debug_files_upload(
4955 auth_token: ' ___ORG_AUTH_TOKEN___' ,
5056 org_slug: ' ___ORG_SLUG___' ,
@@ -53,7 +59,7 @@ sentry_debug_files_upload(
5359)
5460```
5561
56- ``` ruby {tabTitle:Fastlane plugin before 1.20.0}
62+ ``` ruby {tabTitle:Fastlane plugin before 1.20.0} {"onboardingOptions": {"source-context": "5"}}
5763sentry_upload_dif(
5864 auth_token: ' ___ORG_AUTH_TOKEN___' ,
5965 org_slug: ' ___ORG_SLUG___' ,
@@ -94,7 +100,7 @@ Another option is to use warnings, and then set `GCC_TREAT_WARNINGS_AS_ERRORS` t
94100
95101<OrgAuthTokenNote />
96102
97- ``` bash {tabTitle:Warn on failures - nonblocking}
103+ ``` bash {tabTitle:Warn on failures - nonblocking} {"onboardingOptions": {"source-context": "10"}}
98104if [[ " $( uname -m) " == arm64 ]]; then
99105 export PATH=" /opt/homebrew/bin:$PATH "
100106fi
@@ -103,7 +109,9 @@ if which sentry-cli >/dev/null; then
103109export SENTRY_ORG=___ORG_SLUG___
104110export SENTRY_PROJECT=___PROJECT_SLUG___
105111export SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
106- ERROR=$( sentry-cli debug-files upload --include-sources " $DWARF_DSYM_FOLDER_PATH " 2>&1 > /dev/null)
112+ ERROR=$( sentry-cli debug-files upload \
113+ --include-sources \
114+ " $DWARF_DSYM_FOLDER_PATH " 2>&1 > /dev/null)
107115if [ ! $? -eq 0 ]; then
108116echo " warning: sentry-cli - $ERROR "
109117fi
@@ -112,7 +120,7 @@ echo "warning: sentry-cli not installed, download from https://github.com/getsen
112120fi
113121```
114122
115- ``` bash {tabTitle:Error on failures - blocking}
123+ ``` bash {tabTitle:Error on failures - blocking} {"onboardingOptions": {"source-context": "10"}}
116124if [[ " $( uname -m) " == arm64 ]]; then
117125 export PATH=" /opt/homebrew/bin:$PATH "
118126fi
@@ -121,7 +129,9 @@ if which sentry-cli >/dev/null; then
121129export SENTRY_ORG=___ORG_SLUG___
122130export SENTRY_PROJECT=___PROJECT_SLUG___
123131export SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
124- ERROR=$( sentry-cli debug-files upload --include-sources " $DWARF_DSYM_FOLDER_PATH " --force-foreground 2>&1 > /dev/null)
132+ ERROR=$( sentry-cli debug-files upload \
133+ --include-sources \
134+ " $DWARF_DSYM_FOLDER_PATH " --force-foreground 2>&1 > /dev/null)
125135if [ ! $? -eq 0 ]; then
126136echo " error: sentry-cli - $ERROR "
127137fi
0 commit comments