The Bug That Took Seven Hours
How one missing config, seven hours of debugging, and vibe-coding with Cursor taught me a lesson I didn’t expect.
I’ve been a software engineer for over 13 years.
Long enough to know that debugging is rarely glamorous, almost never linear, and always humbling.
But lately, something has shifted in how I build.
Over the last few months, I’ve been exploring “vibe-coding”. A flow state where you build fast, iterate freely, and let AI tools like Cursor assist you in ways that feel almost collaborative. It feels like pairing with a very patient engineer who never gets tired of your “one more thing…” questions.
Cursor has genuinely changed the way I move.
Not because it writes all the code for me, but because it amplifies the system-level understanding I’ve accumulated over the years. It stitches together my instincts with rapid experimentation, letting me build things in hours that would have taken days.
But this story is not about speed.
It’s about a bug, a deceptively simple one that took me seven hours to fix.
And those seven hours kick-started my decision to begin writing publicly again.
The setup: implementing Mixpanel tracking
I was adding Mixpanel to track user actions. The implementation looked correct:
Initialization with the token
Event tracking calls
User identification
The code seemed right. But the events weren’t showing up in Mixpanel.
The debugging marathon begins
I spent about 7 hours (across multiple sessions) trying to figure out why events weren’t appearing in the Mixpanel dashboard.
Hour 1-2: “It must be the implementation.”
I asked Cursor to review the code against Mixpanel’s docs. We refactored, added logging, and verified initialization. Still nothing.
Hour 3-4: “Maybe it’s the event structure?”
We tried different event formats, added properties, removed timestamps, and adjusted user identification timing. Network requests were being sent, but Mixpanel stayed empty.
Hour 5-6: “Let’s start over.”
I asked Cursor to remove everything and rebuild from scratch, following the docs step by step. Same result.
Hour 7: The Twist: It Was Never a Code Problem
At some point, out of pure frustration, I went back to Mixpanel’s docs.
Not for anything specific.
Just to reset my brain.
That’s when I stumbled on a tiny section titled:
“EU Data Residency.”
“Route data to Mixpanel’s EU servers by setting an api_host configuration when creating the Mixpanel object.”
That’s it? That’s all?
I checked my Mixpanel project settings, and sure enough, my project was configured for EU data residency. But I hadn’t updated the api_host in my code. I was still using the default US endpoint.
Here’s what the docs said, word-for-word:
I had missed this.
Cursor had missed this.
The events didn’t throw errors — they just silently disappeared.
I updated the code with the correct api_host.
Within minutes, everything started working as expected.
Seven hours of debugging.
One line of configuration.
Classic.
The bigger picture: Why I’m Sharing This
For most of my career, I’ve built things quietly.
Solve, ship, move on.
But something about this experience felt like a nudge:
A reminder that even as a senior engineer, technical lead, and Engineering Manager now, the basics can bite
A reminder that documentation still saves more time than debugging. The data residency requirement was in the docs, but not prominently. Reading carefully saved the day.
A reminder that AI coding tools are powerful, but your understanding still sets the direction
And most importantly: A reminder that these stories are worth sharing
This bug wasn’t profound.
It wasn’t complex.
It wasn’t even interesting in a technical sense.
But it was human.
It was real.
It was the lived experience of building in 2025 with AI, with experience, with curiosity, and with frustration included in the package.
This is the start of a new phase: building in public and sharing learnings. I’m documenting the journey: the wins, the struggles, and the lessons.
For anyone facing the same issue
If your Mixpanel events aren’t appearing:
Check your project’s data residency (Project Settings → Data Residency)
Match your API host:
EU projects: api_host: ‘https://api-eu.mixpanel.com’
US projects: api_host: ‘https://api.mixpanel.com’ (or omit for default)
Verify in the Network tab that requests go to the correct endpoint
Have you had similar debugging experiences with AI tools? How did your experience help (or not help)? I’d love to hear your stories.
P.S. If you’re working with Mixpanel and EU data residency, save yourself 7 hours, set that api_host from the start.



