Debug with evidence
AI-assisted debugging works best when you can show a reproducible problem and observable results.
How it works
Use the error report to build a concrete sequence you can repeat. Reproduce it once, make one change to the suspected cause, then try the same case again. If it still fails, keep the evidence and revise the explanation rather than applying more unrelated edits.
Walk through an example
Record the smallest input that triggers the error, the actual result, and the expected result. Ask for one likely explanation and a way to check it.
What to watch for
A plausible explanation can still be wrong. Make one focused change at a time and reproduce the original case afterward.
Check your understanding
What input makes a useful first check?
See the example and explanation
- Worked example
- Given
Errors appear only with an empty search query. - Answer
An empty query.
A small case isolates the branch that handles missing input and gives you a repeatable result.