Hacker News new | past | comments | ask | show | jobs | submit login

> Stack traces are lost when generators throw().

V8 (and probably others) now has some special cases for async functions (and generators, I think, but those are much more rare) to show useful stack traces with the lineage of async calls. For example, this code shows the stack trace you'd expect when run in latest Chrome or Node.js.

  async function c() { throw new Error('Some error'); }
  async function b() { await c(); }
  async function a() { await b(); }

Yeah, V8 in particular has possibly the best debugger tool available in any language ever; an easy to use UI, but still absolutely chock full of just about every useful feature you could imagine.

Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact