How do you catch bugs when vibe coding without getting stuck in a debugging loop?
by•
Building tools quickly with AI agents works great until something randomly breaks and you have no idea which change caused it.
Tracing errors back through AI-generated code can take hours when there are no proper tests set up. I've heard people talk about using evaluation agents or automated checks but setting those up properly isn't always clear when you just want to ship fast.
What's your simple setup or routine for testing and catching bugs when coding with AI tools?
7 views
Replies
My routine is less about tests and more about making the app tell on itself. Every debug print in the app also goes to a log file on the device, in every build, written as a plain sentence about what happened: "login link ignored, already signed in". Every tappable control has a fixed name and the tap is logged under it. So when something breaks, on my phone or a user's, Settings has a Share Logs button and I hand the agent the tap trail plus the last few lines before the failure, instead of a description. That shortens the loop, because the agent is reading evidence and not guessing which of its changes did it. Two smaller habits. Ad hoc prints get a greppable prefix so they can be removed before the task ends. And a build that fails is treated as information, not as the agent's mistake, so it reads the error instead of apologizing and trying something random.