AI debugging: error resolution
This course covers how to hand an error to an AI assistant and judge the diagnosis it returns. It starts with pasting the exact error text instead of a paraphrase, then showing the method that raised it, with a line showing where its inputs came from. It covers reporting what you already checked, using a Rails console sandbox, and reading a diagnosis with three critical questions. It also explains the risk of applying a fix you cannot explain. A final lesson follows one Rails error through every step.
What you'll learn
- ✓Pasting the exact exception class, message and app lines instead of a summary
- ✓Choosing the right amount of code: the raising method plus where its inputs came from
- ✓Checking facts in bin/rails console --sandbox and reporting what you already tried
- ✓Testing an AI diagnosis against the error, the code and the real cause
- ✓Spotting fixes that mask bugs, remove safeguards like permit! or patch the wrong file
- ✓Explaining why a fix works before applying it
Curriculum
7 lessonsGiving AI the full stack trace
Two students get different AI answers to the same error because of what each one pasted in.
Paste, don't paraphrase
Paraphrasing an error drops the class, key and value, so paste the exact text in its order.
Show the code that raised it
Paste the method that raised the error plus one line of context, not nothing and not the whole file.
Say what you already tried
Report checked facts and rejected suggestions, using the Rails console sandbox to test against real data safely.
Reading an AI diagnosis like a skeptic
Three questions test whether a diagnosis quotes the real error, points at real code and fixes the cause.
The risk of a fix you don't understand
A fix that silences an error can mask bugs, remove safeguards or patch the wrong file.
Putting it together: one error, start to finish
One ForbiddenAttributesError goes through every lesson's step, from pasting the text to understanding the fix.