node.js – Node JS (Electron) | find unresolved 3rd party promise in runtime
In some rare case my grpc stream get stack waiting for unresolved promise inside a 3rd-party library code
I wish to find a way, in runtime or after, to find the line with the unresolved promise (async-await call), but I couldn’t find a way to do it electron (chromium) dev tools or a third party utility, and since it’s a third party code I cant use an interceptor.
unresolved promise example:
async function thirdPartyFunc() {
console.log("t1");
await new Promise((resolve)=>{});
console.log("will never happen");
}
(async ()=>{await thirdPartyFunc()})();
any ideas of how I can do it?
Read more here: Source link