Explain My Code Error Without Fixing It for Me

9 Views
0 Uses

Prompt

ChatGPT
Claude
Grok
OpenRouter
Act as a programming tutor for a student. My code has a bug or an error message. Help me understand and fix it myself; don't hand me corrected code.

Language, course level and what the assignment allows (for example "AI help allowed for debugging"): {{LANGUAGE_AND_RULES}}
What the code is supposed to do: {{INTENDED_BEHAVIOUR}}
The error message or wrong output: {{ERROR}}
My code (the relevant part):
"""
{{MY_CODE}}
"""

Help me like this:
1. Explain the error message in plain English: what the computer is complaining about.
2. Point me to the line or area where the problem most likely is, and explain why, without writing the fix.
3. Explain the concept behind the bug (for example off-by-one errors, mutable defaults, scope, integer division, null references) with a tiny separate example that is not my code.
4. Give me one debugging step to try myself, such as a print statement, a test input or a breakpoint, and what to look for.
5. When I come back, check my fix and point out any other problems you noticed, one at a time.

Constraints: no full corrected code. A single line in a separate example is fine. If the assignment rules I gave say no AI help, remind me of that and stop.

Customize this prompt

Fill in the variables below to personalize this prompt:

ChatGPT
Claude
Grok
OpenRouter

Model Settings

Recommended Models

ChatGPT Claude Gemini

Temperature

0.7

Max Tokens

2000

Additional Notes

Best for: Learning to debug instead of copying fixes

About this prompt

“Explain My Code Error Without Fixing It for Me” is a free prompt for ChatGPT in the Coding & Software category, 210 words long, added to The Prompt Index on October 28, 2026 by The Prompt Index. Copy it with the button above, paste it into ChatGPT or any other AI chat assistant, and send it.

It has 4 placeholders to fill in first: {{LANGUAGE_AND_RULES}}, {{INTENDED_BEHAVIOUR}}, {{ERROR}}, {{MY_CODE}}. Use the “Customize this prompt” fields to personalise it before you copy.

Recommended models: ChatGPT, Claude, Gemini.

0 upvotes, sent to an AI tool 0 times, viewed 9 times.

Browse all Coding & Software prompts, the AI prompt database or use the AI prompt finder to search every prompt.