How do I debug when something breaks?
Quick Answer
Read error messages carefully, ask AI to explain them, check browser console for errors, and isolate the problem by testing one thing at a time. Debugging is a learnable skill.
Full Explanation
Debugging is frustrating for everyone, but there's a systematic approach that works:
Step 1: Read the error message Error messages seem cryptic at first but usually point directly to the problem. Copy the exact message and search for it or ask AI to explain it.
Step 2: Check the browser console Right-click in your browser, select 'Inspect', go to 'Console'. Red errors there tell you what's failing on the frontend.
Step 3: Isolate the problem
- When did it start breaking? What changed?
- Does it break for all users or just some cases?
- Does it work locally but not when deployed?
Step 4: Use AI to help
- Describe the problem to your AI tool or ChatGPT:
- What you expected to happen
- What actually happened
- The exact error message
- What you've already tried
Step 5: Simplify If something complex doesn't work, build a simpler version first. Get the basics working before adding complexity.
Common debugging scenarios:
'White screen of death': Usually a JavaScript error. Check browser console.
'It works locally but not deployed': Usually environment variables or build configuration.
'Data not showing up': Check database rules, API responses, and that data actually exists.
'Authentication not working': Often API keys or configuration in the auth service.
Debugging skill improves dramatically with practice. Track problems you encounter and their solutions-you'll see patterns.
Related Questions
What happens when my AI-built app breaks?
You debug it the same way any app is debugged-error messages, testing, and iteration. AI tools can often help fix issues they created, or you can hire help for complex problems.
Is the code AI generates actually good?
It's usually decent-following modern patterns and best practices for straightforward features. But it lacks the judgement of experienced developers for complex decisions and edge cases.
Do I need to know about APIs?
A conceptual understanding helps significantly. APIs are how different services communicate-when your app talks to Stripe for payments or sends emails, that's an API.
Get Hands-On Answers at Buildday Melbourne
Stop reading about building apps and start actually building. Join our one-day workshop and get your questions answered while creating something real.
Related Questions
What happens when my AI-built app breaks?
You debug it the same way any app is debugged-error messages, testing, and iteration. AI tools can often help fix...
Do I need to know about APIs?
A conceptual understanding helps significantly. APIs are how different services communicate-when your app talks to...
Is the code AI generates actually good?
It's usually decent-following modern patterns and best practices for straightforward features. But it lacks the...
How long does it take to learn vibe coding?
Most people can build their first functional prototype within a weekend, but building production-ready apps takes 2-3...
Should I learn to code if AI can do it?
Learning fundamentals is still valuable, but spending months on syntax before building anything is increasingly...
What's the difference between frontend and backend?
Frontend is what users see and interact with (buttons, forms, layouts). Backend is the behind-the-scenes logic...