firefox-devtools / profiler

Firefox Profiler — Web app for Firefox performance analysis
https://profiler.firefox.com
Mozilla Public License 2.0
1.18k stars 384 forks source link

Consider opening source files in debugger as well #5114

Open canova opened 1 week ago

canova commented 1 week ago

Currently we have our own source view but DevTools team suggested that we can also add an option open the devtools panel with the WebChannel. This option could possible be a context menu item. This way they can have more options and features.

There are some open questions though:

ochameau commented 1 week ago

It would be nice to start with a simple usecase.

You use devtools to generate a (tracer) profile, that profile is opened in a new tab, you navigate through frames, you want to open that frame in the devtools still opened. This would mean going back and forth between the website tab with devtools and the distinct profiler tab. We could followup to make the DevTools magically move to the profiler tab. There is no particular challenge in term of implementation or UX. I'm only wondering if the existing codebase knows from which tab the profiler was recorded ? I'm not seeing many references to browserId in devtools/client/performance-new/, so that sounds unlikely. I imagine we would have to do something where we open the profiler from devtools: https://searchfox.org/mozilla-central/rev/cc01f11adfacca9cd44a75fd140d2fdd8f9a48d4/devtools/client/framework/toolbox.js#737-747 in order to store the browser element/ID of the profiled tab. We aren't passing any such information to the profiler codebase.