Now and .then: Debugging Async JS
summary
Concrete debugging recipes and gotchas: a callback that returns undefined because readFile runs asynchronously, a Promise wrapper that silently succeeds because it never rejects, and a .then/.catch ordering bug that still runs downstream handlers. Uses console.log for quick probes and the Chrome DevTools debugger to step through async flow. Highlights that async functions return promises, that refactors can turn parallel work into blocking awaits, and urges the rule always reject and practicing failure modes to learn what breaks.
AI-written summary · about
chapters (9)
- 0:00Start
- 1:17Why Is Debugging Asynchronous Code So Difficult
- 1:46Examples of Async Bugs
- 2:57Get Config Function
- 11:10Silent Error
- 14:06The Debugger
- 19:24Promises and Async Await
- 20:56Break Point
- 21:36Async Functions Return Promises
related talks
25mNow And Then Debugging Async JS
25mNow and .then: Debugging Async JavaScript
25mDebugging async JS
14mThe Promised Path to Async, Awaits
22mHave You Heard the Joke About Async Debugging? I Promise It Is Good
47mThere and back again Understanding Async Await
46mAsynchronous JS Without the Cringe
33mAsync Functions Awaiting You
