~/talk

Now And Then Debugging Async JS

Talkat BeJS Conf 2023 · 2023-05-11..05-12· [javascript]
slides:none on file

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

  1. 0:00Introduction
  2. 1:14The challenge of async bugs
  3. 4:48Logging and debugging logic
  4. 9:16Promise error handling
  5. 12:50Using the browser debugger
  6. 17:38Async/await pitfalls
  7. 21:57Building debugging expertise
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.