Break one letter, then repair it
A useful bug report describes what you did, what you expected and what happened instead.
- Save the working practice page and press Count once. Use the supplied broken copy for the next step, or save a copy of the working file and change updateCount() to pdateCount() on the line inside the click handler.
- Open the broken copy, press Count and note what happens. Open Developer Tools → Console and copy the first error with its filename and line.
- Paste the broken source and evidence into the prompt. Apply the smallest repair to a new file.
- Reload the repaired file, press Count twice and check the Console again.
Check your result
- After the repair, Count changes from 0 to 1 and then 2.
- The same error no longer appears after a fresh reload and two clicks.
Exercise card · prompt and fileshttps://chatbot-vibecode.industrial-linguistics.com/exercises/debug.htmlOpens in a new tab
15:00