Debugging is the practical work of finding and fixing code that behaves incorrectly. It matters especially when generated code looks convincing but rests on a wrong assumption. section 5.5
A weather map that fails
An engineer asked ChatGPT to add Singapore weather stations to an existing map. The code failed because it assumed the Weather API returned a different data format. Making the prompt specify the actual JSON structure fixed that problem. A wrong CDN URL later showed that debugging remains necessary even after prompts become more detailed. section 5.5
Effective debugging here means:
- Check whether the implementation matches the external API rather than trusting plausible-looking code. section 5.5
- Improve the prompt when an incorrect assumption caused the failure, but continue validating the result. section 5.5
- Treat AI-supplied fixes as leads, not verdicts; confident wrong pointers can create an endless rabbit hole. section 5.5















