How do you capture and diagnose crashes in production MAUI apps?
Short answer
Integrate a crash/telemetry SDK (App Center successor/Sentry/Application Insights) to capture unhandled exceptions with stack traces, device info, and breadcrumbs.
Advertisement
AModel answer
Integrate a crash/telemetry SDK (App Center successor/Sentry/Application Insights) to capture unhandled exceptions with stack traces, device info, and breadcrumbs. Hook AppDomain.UnhandledException and per-platform handlers, symbolicate native crashes with debug symbols, and monitor crash-free rates per release.
AppDomain.CurrentDomain.UnhandledException += (s, e) =>
_telemetry.TrackException((Exception)e.ExceptionObject);Real-world example
A spike in crashes after a release is pinpointed to one device model via telemetry stack traces and hotfixed the same day.
Likely follow-ups
- How do you symbolicate native crashes? | What is a crash-free rate?
Related topics