Trace symptoms to causes with evidence.
- stack traces
- breakpoints
- network panel
- minimal reproduction
Read the first relevant error and follow its stack to the failing line. Inspect actual values, network responses, and DOM state. Reduce the problem to a small reproduction before changing several things at once. Fix the root cause, then verify the original scenario and nearby cases.
A console error after a previous error may be a consequence rather than the first cause.
Debug a deliberately broken selector or data conversion and write down the cause and fix.
Open example.html in a browser and edit example.js. Save, refresh, and use the Console and debugger to inspect values.
- Explain the core idea in your own words without reading the code.
- Change one input and predict the output before running it.
- Test one boundary or failure case, then record what you changed.