Any way to detect an async stack trace (like Chrome devtools does)?

#!/JoePea joe at trusktr.io
Wed Jul 8 04:54:00 UTC 2020


Is there some way (perhaps by patching methods on objects?) so we can
track async call stacks?

When we pause code in devtools, we are able to see the async stack
trace of the code.

What I'd like to do is to effectively detect the same thing as
devtools does at some point in any code. As a specific example, I'd
like to detect the async stack trace of any call to `fetch`.

Is such a thing possible with runtime code?

Or would it require instrumentation of the source code?

#!/JoePea


More information about the es-discuss mailing list