Squashing JavaScript Bugs
summary
A buggy demo app called getRanter gets debugged live using Chrome DevTools and shows concrete fixes: add event.preventDefault to stop form submits, bind or arrow functions to fix lost this in setTimeout, and change conditional checks so the draft saved in localStorage key "nextRant" can be an empty string. Monitoring via TrackJS surfaces 237 API 400s. A memory leak caused 100KB allocations every 10s; clearing render state with children.length = 0 drops retained growth to ~10KB.
AI-written summary · about
chapters (14)
- 0:00Start
- 5:07Impersonate Real Users
- 7:55Elements Panel
- 8:40Event Listener Tab
- 10:55Event Delegation Pattern
- 16:33Async Stack Traces
- 18:31Breakpoints
- 20:38Dot Bind on Functions
- 21:40Fat Arrow Function
- 25:14Element Inspector
- 27:24Local Storage
- 33:05The Worst Place To Catch a Bug
- 44:18Record Allocation Timeline
- 1:00:45Memory Bug








