News for hackers. Stuff that matters.
Re:JavaScript is Good, Actually by alangpierce on Wednesday May 16, 2018 @09:53AM (#17082344)
> 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(); }
  a();
Re:JavaScript is Good, Actually by Ajedi32 on Wednesday May 16, 2018 @10:14AM (#17082527)
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.