Why Starting Over Is Rarely the Answer
When something breaks in Replit, the instinct is often to start over -- generate a whole new app, paste in fresh code, hope it works this time. This instinct is almost always wrong. The code that is working is still working. The problem is one specific function, one incorrect variable, one missing dependency, one wrong route. Starting over means rebuilding all the working parts again and usually hitting the same or similar issues.
The debugging mindset: something specific broke. Something specific will fix it. The goal is to identify the specific thing as narrowly as possible and fix only that thing. Claude is extremely good at this when you give it the right information.
The Three Things Claude Needs to Fix Your Bug
1. The exact error message: Open the Replit console (the terminal panel at the bottom). Copy the complete error message, including the file name and line number if shown. Do not paraphrase the error. Copy it exactly.
2. The specific code causing the problem: If the error points to a file and line number, copy the relevant function or section -- usually ten to twenty lines around the problem area. If the error is not specific, copy the entire file where the problem is likely.
3. What it should do: One sentence describing what the feature should actually do when it works correctly.
The Fix Prompt
"I have a bug in my Replit app. Here is the error message: [exact error]. Here is the relevant code: [code]. This feature should [one-sentence description]. Please fix only this specific issue without changing anything else in the code."
The "without changing anything else" instruction is critical. Without it, Claude may produce a rewrite that fixes the bug but changes other functionality that was working correctly.