Use this guide when you have a bug where the code runs but gives the wrong result, or when you keep adding print lines and still cannot see what is happening. You need a code editor with a debugger, such as VS Code with the Python extension, or a browser's developer tools for JavaScript.
Step by step
Reproduce the bug on demand
Before opening the debugger, write down the exact input and steps that produce the wrong result, and what result you expected instead. Make the smallest version you can, such as a single function call with one set of values. A bug you can trigger reliably in a few seconds is a bug you can debug; a vague one is not.
The rest of this guide is for members
The rest of this guide – the remaining steps, a ready-to-use checklist, practical tips and fixes for common problems – is for members. Membership unlocks every ABCDayZ guide.
£3.99 for 1 month or £29 for 12 months. One payment, no automatic renewal.
Unlock all guidesAlready a member on another device? Open your personal access link. Bought Programming with AI? Your first month is included.