stackdump
Get a dump file for your unhandled promise rejection stack and inspect it in a browser. For Node.js 8 and above.
Install:
npm install stackdump
test.js:
;
$ node -r stackdump test.js
[stack dumped to node-21992-20171130T221243.dump (gen in 214 ms)]
(node:21992) UnhandledPromiseRejectionWarning: Error: foo
at Timeout.foo [as _onTimeout] (/home/sqrt/src/stackdump/test/fixtures/crashing-script.js:3:18)
at ontimeout (timers.js:485:11)
at tryOnTimeout (timers.js:309:5)
at Timer.listOnTimeout (timers.js:269:5)
Creates a core dump file with a name like node-21992-20171130T221243.dump
(or writes to a file path specified via the STACKDUMP_FILE
environment variable).
Inspect that file in the browser:
$ stackdump-open node-21992-20171130T221243.dump
License
MIT