Module 01 · 13 min
How to get unstuck: debugging with AI
This is perhaps the most important lesson of all. You are going to run into errors CONSTANTLY — not because you're doing it wrong, but because that's just how building works. Nobody writes perfect code on the first try, not me, not people who have been doing this for twenty years. The difference between those who move forward and those who quit isn't not making mistakes: it's knowing how to get unstuck. And with AI, it's easier than ever.
The golden rule: read the error
Beginners panic and close their eyes at the wall of red text. Builders READ it. The error almost always tells you two things: WHAT happened and WHERE (which file, which line). It's not a punishment: it's the best clue you have. Learn to look at it instead of hiding from it.
The method that solves 95% of issues
- Copy the FULL error (all the red text, not just a chunk). The snippet you think 'doesn't matter' is usually the one that matters.
- Paste it to the AI with context: 'I am building X in Next.js/Windows, I did Y, and I get this error. How do I fix it step by step?'.
- Apply what it tells you, ONE step at a time. Don't change five things all at once or you won't know which one worked.
- If it doesn't work, tell it 'it's still happening, here's the new message' and paste the new error. The second error is usually different — that's progress, not failure.
💡 Give it context, not just the error
The AI solves things much better if it knows what you were doing, your system, and your stack. 'I get an error' doesn't help; 'I'm on Windows, I added Firebase Auth to my Next.js project, and when logging in I get this error [paste everything]' almost always gets solved on the first try.
Worked example: from a red wall to the solution
You're running your project and the terminal spits this out:
Module not found: Can't resolve 'firebase/auth'The beginner panics. The builder READS: 'cannot find module firebase/auth'. The clue is crystal clear — that piece is missing or installed incorrectly. Instead of guessing, you pass it to the AI with context:
Estoy en Windows con un proyecto Next.js. Agregué
login con Firebase y al correr 'npm run dev' me sale:
Module not found: Can't resolve 'firebase/auth'
¿Cómo lo arreglo paso a paso?The AI will reply with something like 'you need to install Firebase, run npm install firebase'. You apply it, run it again, and keep moving. An error that looked like a wall was solved in two minutes because you READ it instead of being afraid of it.
Getting unstuck: from a red wall to the fix
✖ Module not found: Can't resolve 'firebase/auth'
at ./app/login/page.tsx:3
That red wall pops up. What do you do?
The error isn't a punishment: it's your best clue. The method that solves 95%: read → context → one step → verify.
When the AI gets stuck too
- Break down the problem: isolate which part is failing (remove things until it works, then bring them back little by little).
- Google the exact error — someone already had it and solved it on a forum.
- Take a break: nearly 30% of roadblocks are solved by coming back with a fresh mind. Seriously.
- Go back to a commit that worked (that's what Git is for!) and move forward again more carefully.
⚠️ Don't paste code blindly
When the AI gives you the solution, don't just copy it: ask it to explain WHAT changed and WHY. If you just paste patches you don't understand, in two weeks your project will be a black box you don't know how to fix. Understanding the fix is part of getting unstuck.
Key takeaways
- Errors are part of building, not a sign that you're doing it wrong.
- Golden rule: READ the error — it tells you what and where.
- Method: full error + context → AI → one step at a time → repeat with the new error.
- When everything gets stuck: isolate, Google it, rest, or go back to a working commit.
- Understand each fix; don't paste patches blindly.
You don't get stuck because you're bad at this. You get stuck because you're building. Getting unstuck IS the skill. And you've already got it.
Comentarios
Inicia sesión (arriba) para leer y participar en la conversación de la comunidad.