How to use source maps (or react profiler) for puppeteer tracing?

Viewed 208

I am able to create some trace.json file with puppeteer, as described here: Puppeteer performance timeline?

However, the minified method names shown in the timeline are not really helpful.

a) How can I enable source maps for the chrome dev tools tracer?

In addition to the default profiler from chrome dev tools, following React extension provides a profiler that is able to show the original method names:

https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en

enter image description here

b) Is it possible to use that profiler with puppeteer instead of using the default profiler?

c) If I try to open a trace.json file that has been created with puppeteer await page.tracing.start(.. trace, I get the error

Unsupported profiler export version "undefined"

=>Is it possible to adapt puppeteer to create some output file that is compatible to the React profiler?

0 Answers
Related