You can view the demonstration video here.
SENTRY_SEND_DEBUGWITH_SENTRYcmake -S ./ -B build/ -DWITH_SENTRY=ON -DSENTRY_SEND_DEBUG=1
qmake6 ../src/mudlet.pro CONFIG+=WITH_SENTRY SENTRY_SEND_DEBUG=1
All PR code is wrapped with IF (WITH_SENTRY) blocks, making it easy to enable or disable the Sentry integration.
The SENTRY_SEND_DEBUG option is used to automatically upload debug files to Sentry.io. These files are required by Sentry to display the exact line of a crash.
Sentry requires both the executable and its corresponding debug symbols. Debug symbol files can be large (up to 350 MB for Mudlet), which is why this option SENTRY_SEND_DEBUG exists—to avoid uploading the full debug files on every CI push.
.pdb file.debug file.dSYM folderIdeally, the executable is “stripped” of all debug symbols to reduce its size, while the debug symbol files contain all the necessary debugging information. Both the stripped executable and the debug files are sent to Sentry, which is sufficient for accurate crash reporting.
Added a secondary program: A small window prompts the user for consent to send the crash report. This program is located at src/crash_reporter/main.cpp.
Copied a mandatory Sentry-provided executable (crash_handler) required for proper functioning, which must be placed alongside the Mudlet executable.
Generated a mandatory cache directory at runtime for storing Sentry crash reports.
Expected cache locations:
Linux : ~/.cache/mudlet/sentry
macOS : ~/Library/Caches/mudlet/sentry
Windows : C:\Users\...\AppData\Local\Cache\Mudlet\sentry
Added a git submodule : sentry-native
Added two CI secret variables
${{ secrets.SENTRY_DSN }} sets the default DSN at compile time (developers can override it via an environment variable named SENTRY_DSN).${{secrets.SENTRY_AUTH_TOKEN}} is used to send debug files. (dev can also override it via a environment variable SENTRY_AUTH_TOKENmudlet) and obtain the project’s DSN then add it to the console environment: export SENTRY_DSN=”…”export MUDLET_CRASH_TEST=1 (thanks to this variable, Mudlet will crash whenever you open a profile. Let’s use Sentry to see exactly where I inserted the crash.)But without the debug files, it doesn’t show exactly where the crash is.
export=SENTRY_AUTH_TOKEN="..."-DSENTRY_SEND_DEBUG=1
CI/send_debug_files_to_sentry.sh/claim #7126, fixes #7126.
I pushed a working snippet for qmake (mudlet.pro) aswell, Although QMake is expected to be removed out soon, I added this snippet to ensure compatibility for the time being.
Nicolas KEITA
@NicolasKeita
Mudlet
@Mudlet