A wall of red English error text, or a chunk of code you can’t make sense of — for many people that’s the moment programming feels hopeless, when the only option was searching for ages and reading forum threads you don’t understand.
There’s a genuinely useful move now: paste the error or code as-is to AI, have it explain in plain words first, then tell you how to fix it. It tells you not just “what’s wrong” but “why, and what the fix means.” This needs no coding knowledge — follow the explanation step by step and most small problems you can solve yourself.
When to use it
When running someone else’s code, AI-generated code, or following a tutorial throws an error; or when you’re staring at code with no idea what it does and want to understand it.
How to do it
- Copy the entire error message — don’t grab just one line; paste it from start to end exactly, the fuller the better for AI
- Open an AI (a chat AI like DeepSeek or Claude, or Tongyi Lingma inside your editor), use the prompt below, and paste the error together with the relevant code
- Ask it for three things: what the error means, the most likely cause, and exactly how to fix it (the corrected code or the lines to change)
- Apply the fix and re-run; if it still errors, paste the new error back and say “fixed that but now it’s this” — a few rounds usually cracks it
Weak vs strong
On the left, with no error or code, AI can only guess; on the right you paste both and ask for “plain words and a corrected version,” so you get something you can apply directly.
Copy-paste prompt
I’m not great with code, and running the code below throws an error. In plain terms please: 1) explain what the error means; 2) point out the most likely cause; 3) give the corrected full code with a short note on what you changed and why. Error:【paste the full error as-is】 Code:【paste the relevant code as-is】
Worked examples
You get:AI turns the gibberish into plain language (e.g. “it’s looking for something that doesn’t exist”), lists common causes and where to check — and you immediately know where to look.
You get:It “translates” section by section, then tells you “all of this is really just doing one thing” — and the unfamiliar code stops being scary.
Level up
- Ask right inside your editor: tools like Tongyi Lingma live in your editor — select the failing code, right-click, and have it explain or fix, no copy-paste back and forth
- Have it teach, not just answer: add “also tell me how to read this kind of error myself next time,” and you’ll need help less and less
- Worried it over-edits: ask it to “just explain and point out what to change first; give the full code after I confirm,” so you understand before anything moves
Common mistakes
- Pasting half the error — much of the key info is at the end or in the surrounding context; paste it all
- Not including the code — an error with no offending code leaves AI guessing; paste both and the hit rate jumps
- Treating it as fixed without checking — AI’s fix isn’t always right first try; always re-run, and if it still fails, feed the new situation back
FAQ
Will the code I paste leak? Can I paste company code?
What if its fix is wrong and things get messier?
Pro tip:Before you change anything, save a copy of the original code. That way if a fix makes things worse, you can always roll back — and experimenting carries no risk.