js-self-profiling
                                
                                
                                
                                    js-self-profiling copied to clipboard
                            
                            
                            
                        Metadata for "async" callstacks
I'll just throw this idea out there... I've seen JavaScript debuggers/instrumentation which synthesize callstacks between async operations. So for example if you had JS like:
function f(url) {
  fetch(url)
    .then(response => response.json())  // line 3
    .then(g);
}
function g(json) {
  // here
}
With "async" callstacks you'd see breadcrumbs which let you reconstruct a stack to "here" like f, fetch, f, g even though the JS VM stack is just (internal Promise gunk), g.
This could apply to any asynchronous callbacks: Promises, timers, etc.
It would be nice to have this.