Debugging async JS
summary
Walks through concrete failures: a callback-based getConfig returns undefined because readFile is async, a handmade Promise silences errors by not rejecting, a .catch placed too early still allows later .then to run, and refactoring to async/await accidentally serializes parallel requests or returns a Promise into UI. Uses console.log and Chrome DevTools to set breakpoints and step through, demonstrates fixes like always reject errors, move .catch to the bottom, and use debugger to step through and emphasizes experience as the best prevention.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 2:04Analyzing async functions
- 3:37Effective logging techniques
- 5:02Understanding async behavior
- 7:09Silent promise errors
- 8:39Promise debugging pitfalls
- 10:08Correcting error handling
- 12:01UI and async order
- 13:15Using the debugger
- 14:14Stepping through promises
- 16:17Async and await
- 17:13Blocking vs non-blocking
- 18:57Complex async bugs
- 20:12Building debug intuition
- 21:43Be the bad dog
related talks
26mNow and .then: Debugging Async JS
25mNow and .then: Debugging Async JavaScript
25mNow And Then Debugging Async JS
22mHave You Heard the Joke About Async Debugging? I Promise It Is Good
14mThe Promised Path to Async, Awaits
29mEssential JavaScript debugging tools for the modern detective
28mError handling: doing it right!
33mEssential JavaScript debugging tools for the modern detective
