Is it possible to get stack traces across async/await boundaries using --harmony_async_await in Node 7?
Javascriptnode.jsAsync AwaitV8BluebirdJavascript Problem Overview
We're experimenting with using --harmony_async_await
in Node 7, and compared to transpiling with babel for async/await are missing the ability to have long stack traces (http://bluebirdjs.com/docs/api/promise.longstacktraces.html).
Obviously, it would be great if there was an option to 'just see this' - on the chrome(ium) side they appear to support it in the inspector, though the latest work on this is after v8.5.4 (i.e. not in Node 7):
https://bugs.chromium.org/p/v8/issues/detail?id=4483
https://codereview.chromium.org/2357423002/
An alternative approach would be to get v8 to use bluebird's promise implementation - but how could I do that? Overriding global. Promise
doesn't change how async/await behave (they still use the default promises).
Javascript Solutions
Solution 1 - Javascript
Since NodeJS v12 async stack traces are enabled by default.