Closed Bug 1471952 Opened Last year Closed Last year

Change default tool to Inspector

Categories

(DevTools :: General, enhancement, P2)

enhancement

Tracking

(firefox63 fixed)

RESOLVED FIXED
Firefox 63
Tracking Status
firefox63 --- fixed

People

(Reporter: jryans, Assigned: mbalfanz)

Details

Attachments

(1 file)

At the moment, the default tool for a new profile is the Console:

https://searchfox.org/mozilla-central/rev/d2966246905102b36ef5221b0e3cbccf7ea15a86/devtools/client/preferences/devtools-client.js#13

From Victoria on Slack:

I propose we change the default tool to Inspector, both for simple consistency reasons and the loftier goals e.g. for new developers, chrome switchers, and curious folk, the first thing they see should be the guts of their webpage with cool creative tools ready to go.
Thanks Victoria for proposing the change, thanks Ryan for filing the bug.
I agree with the proposal, but I would like us to do 2 things before proceeding:
- do some research about why we set it to be the console in the first place (I think this might date back quite a bit, but it would be good to get an idea for what the reasoning was back then and if it still applies)
- get some product feedback too, which I will needinfo both Harald and Martin for.
Flags: needinfo?(mbalfanz)
Flags: needinfo?(hkirschner)
(In reply to Patrick Brosset <:pbro> from comment #1)
> - do some research about why we set it to be the console in the first place
> (I think this might date back quite a bit, but it would be good to get an
Joe: is this something you remember? Know someone who would?
Flags: needinfo?(jwalker)
I can't remember why we did that. My guess would be usage, but I don't have anything concrete.

There was the "children being forced" issue (Someone accidentally hit F12 when on a page which had called some DOM API which caused an error message in the console, which included those words. The user was understandably worried and posted a screenshot to twitter). We could consider the reactions of accidental devtools invocations and their first view friendliness in a decision about what to show first.
Flags: needinfo?(jwalker)
(In reply to Joe Walker [:jwalker] (needinfo me or ping on irc) from comment #3)
> I can't remember why we did that. My guess would be usage, but I don't have
> anything concrete.
Ok, nevermind. I'll continue digging a little bit but I don't have high hopes about finding a documented reason. It's probably usage as you said.
> There was the "children being forced" issue (Someone accidentally hit F12
> when on a page which had called some DOM API which caused an error message
> in the console, which included those words. The user was understandably
> worried and posted a screenshot to twitter). We could consider the reactions
> of accidental devtools invocations and their first view friendliness in a
> decision about what to show first.
That's a good point.
The long term plan is to greet accidental users with about:devtools (i.e. disabling devtools by default). And we know there are a *lot* of accidental users.
(In reply to Patrick Brosset <:pbro> from comment #4)
> (In reply to Joe Walker [:jwalker] (needinfo me or ping on irc) from comment
> #3)
> > I can't remember why we did that. My guess would be usage, but I don't have
> > anything concrete.
> Ok, nevermind. I'll continue digging a little bit but I don't have high
> hopes about finding a documented reason. It's probably usage as you said.
Found the bug where the toolbox was first introduced: bug 788977,
And in the code that landed there, the webconsole was made the default tool (see attachment 684425 [details] [diff] [review]).
Before that, each tool lived in its own panel, either around the browser window or in separate standalone windows.
So, this probably confirms that this decision was made on usage stats at the time.
I do like to revisit those old decisions, thanks for bringing it up.

Inspector has significant usage, but arguments could be made in different ways. Inspector in default mode does not highlight the most interesting parts of the page; while Console probably helps most when someone opens devtools due to a broken functionality. Opening the Inspector via Inspect Element Menu or with element picker active provides the best inspector launch experience.

If the general hypothesis holds true that the default right now is unexpected, we should see a significant amount of users open devtools via shortcut and then switch to Inspector panel. We should be able to poke at that idea with some event telemetry from dev edition.

Is this currently controlled via pref? It would be interesting to run a quick experiment on this, as it also helps us learn how we can drive traffic to other panels with smart defaults.
Flags: needinfo?(hkirschner)
(In reply to :Harald Kirschner :digitarald from comment #6)
> Is this currently controlled via pref? It would be interesting to run a
> quick experiment on this, as it also helps us learn how we can drive traffic
> to other panels with smart defaults.

Yes:

pref("devtools.toolbox.selectedTool", "webconsole");

https://searchfox.org/mozilla-central/rev/d2966246905102b36ef5221b0e3cbccf7ea15a86/devtools/client/preferences/devtools-client.js#13
I agree with the experiment as I also have the feeling that, for a first time opens, the console is more interesting/meaningful.

I would extend the hypothesis actually by saying that I assume most users wanting to open the inspector will do so in more specific ways (context menu or specific keyboard shortcuts), so they select the right element at the same time.

Harald: Do we have data on how the inspector specifically is most accessed?
Flags: needinfo?(mbalfanz) → needinfo?(hkirschner)
+Tim to take a look at the shortcut telemetry that just recently landed.

Thinking more about this after my first comment I realized that this really only affects the first opening. After that, the last selected panel will be opened. Giving Inspector some prime time for those users seems OK. Main discussion point would be how opening the inspector affects accidental openings (more/less scary, more users getting stuck, etc)

Running the experiment also isn't as straightforward as it needs to target new devtools users before their first toolbox opening.
Flags: needinfo?(hkirschner) → needinfo?(tdsmith)
A challenge is that we don't have a robust way of inferring intent from telemetry.

The toggle keys "toggleToolboxF12" (in particular) and "toggleToolbox" (e.g. alt+cmd+I) were the two most popular keyboard shortcuts for toolbox users in the onboarding experiment [1], which makes sense if they bring a user back to what they were doing before.

Some things I could look at from the event telemetry, in order of increasing complexity, are:

- the keyboard shortcuts used to open devtools
- the keyboard shortcuts used to open the inspector directly
- the keyboard shortcuts used to open devtools followed in short order by a switch to the inspector

but I'm not sure any of these shed much light on the first-run experience; would any of these inform a decision?

Running an experiment seems technically feasible insofar as the presence or absence of the `devtools.telemetry.tools.opened.version` preference should let us target an experiment to profiles that have never seen devtools before (it isn't exposed to telemetry, so we may want to do a quick sizing experiment first that just watches that preference for a week and indicates the rate at which new profiles turn over into devtools users) so I think it's a priorities question given that onboarding may replace the first-use experience.

[1] https://metrics.mozilla.com/protected/tdsmith/20180619-devtools_onboarding_experiment_report.html
Flags: needinfo?(tdsmith)
As we are making good progress with the onboarding I don't think it's worth running another experiment for this.  Until then, I'm all for giving the inspector some prime time :)

If we are considering the first run only, it may seem more obvious to have the inspector open first as it's also the first tab in the list.
SGTM. Let's change this without experiment.
Assignee: nobody → mbalfanz
Status: NEW → ASSIGNED
Change default tool to inspector
Comment on attachment 8998479 [details]
Bug 1471952 - change default tool to Inspector;r=rcaliman

Razvan Caliman [:rcaliman] has approved the revision.
Attachment #8998479 - Flags: review+
Pushed by rcaliman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b1b651603919
change default tool to Inspector;r=rcaliman
Comment on attachment 8998479 [details]
Bug 1471952 - change default tool to Inspector;r=rcaliman

Gabriel [:gl] (ΦωΦ) has approved the revision.
Attachment #8998479 - Flags: review+
Flags: needinfo?(mbalfanz)
Keywords: checkin-needed
Pushed by rcaliman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1bbc2b8d4a31
change default tool to Inspector;r=gl,rcaliman
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/1bbc2b8d4a31
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
You need to log in before you can comment on or make changes to this bug.