Now And Then Debugging Async JS
summary
Shows why async callbacks return undefined when readFile runs after a return, and why a custom Promise that never calls reject silently hides filesystem errors; demonstrates the bug where a .then runs after a .catch because order matters and the fix to move .catch to the end. Uses console.log for quick checks and the Chrome DevTools debugger to pause and step through async flows. Explains how converting parallel Promises to sequential await changes behavior and recommends learning failing cases ("be the bad dog").
AI-written summary · about
chapters (7)
- 0:00Introduction
- 1:14The challenge of async bugs
- 4:48Logging and debugging logic
- 9:16Promise error handling
- 12:50Using the browser debugger
- 17:38Async/await pitfalls
- 21:57Building debugging expertise
related talks
26mNow and .then: Debugging Async JS
25mNow and .then: Debugging Async JavaScript
25mDebugging async JS
14mThe Promised Path to Async, Awaits
47mThere and back again Understanding Async Await
22mHave You Heard the Joke About Async Debugging? I Promise It Is Good
46mAsynchronous JS Without the Cringe
33mAsync Functions Awaiting You
