Coding & Software
Debug an Error Message
Paste an error and the code around it to get ranked causes, the smallest fix and a quick check to confirm the diagnosis.
- Customizable fields
- 5 fields
Coding & Software
Explains code you did not write at the level you ask for, tracing the data flow and flagging what it cannot tell from the snippet alone.
Designed for general-purpose AI assistantsPublished November 2026
Fill in the fields and the prompt updates. What you type stays in this page and is never saved or sent.
I need to understand code I did not write. Explain it so I can change it safely.
Language and framework: {{language and framework}}
My experience with this stack: comfortable with the language, new to this framework
What I need to do with it: {{my goal}}
Code:
{{code}}
Explain in this order:
1. Purpose: what this code is for, in two sentences.
2. Walkthrough: follow one realistic input from entry to output, step by step, naming each function or block as you reach it.
3. State and side effects: anything it reads, writes, caches, logs or sends over the network, and anything it changes that other code might depend on.
4. Surprises: behavior that looks wrong, unusual or easy to misread, and why it may have been written that way.
5. Safe change points: where I would make the change I described, and what I should check before and after.
6. Unknowns: things you cannot tell from this snippet alone (callers, configuration, data shapes) and the exact question I should ask or file I should open to find out.
Rules: separate what the code plainly does from your guesses about intent, label every guess as a guess, and do not rewrite the code unless I ask.3 required fields are empty and will stay as a {{placeholder}} in the copied text.
Illustrative only. Real answers depend on your input and the assistant you use.
1. Purpose: This function merges a customer's pending orders into one shipment and decides which warehouse ships it. It runs when a customer clicks "ship together". 2. Walkthrough with one input: Given three pending orders for one customer, merge_orders groups items by SKU, sums quantities, then calls pick_warehouse with the total weight. For 5 kg of items it returns "east" because the east warehouse is the first one with stock for every SKU. 3. State and side effects: It marks each source order as "merged" in the database before the shipment is created. If shipment creation fails afterwards, those orders stay marked merged. 4. Surprises: The weight limit of 30 is hard-coded and never checked against the carrier. The loop skips orders with a null address without logging it. 5. Safe change points: Add your retry around create_shipment, not around the whole function, or the orders will be marked merged twice. Check the status of the source orders before and after. 6. Unknowns: I cannot see pick_warehouse or how stock is stored. Ask who owns the stock table and whether "east" is a fallback or a real preference.
Paste the callers if you can, even roughly. The most common gap in an explanation of an isolated function is how it is actually called.
If the file is long, ask for the walkthrough of one function at a time. A whole-file explanation tends to stay at the level of "this file handles orders".
Treat the "Surprises" section as leads to verify, not as findings. The assistant sees only the snippet, and the surprising behavior may be handled somewhere you have not pasted.
Coding & Software
Paste an error and the code around it to get ranked causes, the smallest fix and a quick check to confirm the diagnosis.
Coding & Software
Generates focused unit tests for one function, covering normal cases, boundaries and invalid input without mocking more than needed.
Coding & Software
Finds why a test passes sometimes and fails other times, ranks the likely causes and gives an experiment to prove each one.