trace.cafe icon indicating copy to clipboard operation
trace.cafe copied to clipboard

trace.cafe doesn't use sourcemaps

Open esprehn opened this issue 2 years ago • 2 comments

If sourcemaps are available devtools will use it to rename functions in the traces, but when uploaded to trace.cafe the sourcemaps never work. It would be much easier to use trace.cafe if it loaded sourcemaps to show unminified names.

esprehn avatar Jul 12 '23 17:07 esprehn

Reading through the devtools frontend code it looks like sourcemaps come from the DebuggerModel: https://github.com/ChromeDevTools/devtools-frontend/blob/2314ddcbfed2456a0477b9cb5e17c48ed3ae7708/front_end/panels/timeline/PerformanceModel.ts#L113C3-L113C3

So devtools itself would need to change not trace cafe?

esprehn avatar Jul 13 '23 22:07 esprehn

In general, the behavior of the Perf panel in trace.cafe should be the same as if you open devtools on example.com and load a saved trace into that instance.

Everything is easy if you're viewing a freshly captured trace. But.. you can also trace a site, save it, open that same site in a new tab, load the trace there. And the location resolving (incl sourcemaps) shouldddddddd mostly work.

If not, we have some room to improve script matching etc.. But.. it's imperfect and we do risk matching against the wrong stuff. cc @and-oli who worked on location resolution.

paulirish avatar Jul 18 '23 19:07 paulirish