Open Bug 1735205 Opened 3 years ago Updated 2 years ago

Ctrl+Shift+1 should work without going to profiler.firefox.com first on nightly

Categories

(DevTools :: Performance Tools (Profiler/Timeline), enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: bas.schouten, Unassigned, Mentored)

References

Details

Right now if you have nightly with a clean profile you have to go to profiler.firefox.com to enable the profiler. I think we could probably just make Ctrl+Shift+1 enable the profiler button directly, at least on nightly.

This shortcut is controlled by the profiler toolbar icon&popup code.

Similarly, bug 1562082 suggested enabling the popup in local builds.
I'd personally be happy with either or both.

Component: Gecko Profiler → Performance Tools (Profiler/Timeline)
Product: Core → DevTools

Note that you can also enable the profile button by customizing the toolbar. Although going to profiler.firefox.com is easier ;-)

Currently we couple the support of the shortcuts and the presence of the button. The goal is that our normal users don't press these shortcuts by mistake.

The code is here: https://searchfox.org/mozilla-central/rev/2c4b830b924f42283632b70f39a60fd36433dd4d/devtools/startup/DevToolsStartup.jsm#237-239 and https://searchfox.org/mozilla-central/rev/2c4b830b924f42283632b70f39a60fd36433dd4d/devtools/startup/DevToolsStartup.jsm#816

I'm not sure we should do what you propose for all of nightly builds, but I still think bug 1562082 is a good idea.

What do you think?

I discussed this with Florian a bit more.

Here is how this could look like on nightly:

  • the shortcuts would be always present
  • when pressing ctrl-shift-1, if the button is not present, we would add it, and open the popup with the introduction part (just like enabling the button on proifler.firefox.com)
  • if the user removes the button, we would still keep the shortcuts with the same behavior.

Also the button would be added if the profiler is active at startup (through the startup profiling feature), there may be another bug for this already.

(oops, it looks like I forgot to send the comment I typed a few days ago; which goes in the same direction as comment 3 anyway)

(In reply to Julien Wajsberg [:julienw] from comment #2)

I'm not sure we should do what you propose for all of nightly builds, but I still think bug 1562082 is a good idea.

I think it would be nice to hook the Ctrl+shift+1 shortcut on Nightly when the profiler isn't enabled, and have it do the same as clicking the "Enable Profiler icon" button of the profiler home page, ie. add the toolbar icon and show the onboarding message, but not start the profiler immediately.

I agree bug 1562082 is a good idea and worth doing, independently of this bug.

Priority: -- → P3

The shortcuts are defined in https://searchfox.org/mozilla-central/source/devtools/startup/DevToolsStartup.jsm, look especially how the function getProfilerKeyShortcuts is used.

Mentor: felash
You need to log in before you can comment on or make changes to this bug.