Unity Sentry-Gemini Debugger: How We Automated Game Bug Smashes with Sentry and AI

This post is submitted for the DEV's Summer Bug Smash Challenge (Smash Stories / Best Use of Sentry / Best Use of Google AI categories).

While playtesting our latest Unity game, we hit a frustrating, intermittent crash. The game would freeze, and our console log was cluttered with a cryptic NullReferenceException. Because the crash occurred randomly during game state changes, finding the exact script reference and state corruption manually was like looking for a needle in a haystack.

Fortunately, we had Sentry integrated into our build. An alert fired on our Sentry dashboard, pinpointing the issue:

Error: NullReferenceException: Object reference not set to an instance of an object