Unable to Open Developer Tools with F12 shortcut

RESOLVED FIXED in Firefox 49

Status

()

Firefox
Developer Tools
P1
normal
RESOLVED FIXED
2 years ago
a year ago

People

(Reporter: alberts, Assigned: ochameau)

Tracking

48 Branch
Firefox 49
x86_64
Windows 10
Points:
---

Firefox Tracking Flags

(firefox49 fixed)

Details

(Whiteboard: [btpp-fix-now])

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
Since the last update (DevEdition 48) Developer Tools don't open for me anymore using the F12 key on any page.
Ctrl + Shift + I and the context menu are working fine. ("Awesome screenshot: Capture and Annotate" captures Ctrl + Shift + I, but with Add-ons it works as expected.)
I just checked 48.0a2 (2016-05-02) and F12 is working for me (on osx and Win7).  See any errors in the Browser Console?  Also, can you please confirm the issue on a clean profile?  I'm curious if you have Firebug installed.
Flags: needinfo?(albert)
This seems possibly related to :ochameau's changes to bind shortcuts dynamically (without <key> elements).
(Assignee)

Comment 3

2 years ago
It works for me in Nightly with Firebug. But yes, it is most likely related to my changes to keys and menus. It may be related to another Add-on...
Priority: -- → P1
Whiteboard: [btpp-fix-now]
(Reporter)

Comment 4

2 years ago
(In reply to Brian Grinstead [:bgrins] from comment #1)
> I just checked 48.0a2 (2016-05-02) and F12 is working for me (on osx and
> Win7).  See any errors in the Browser Console?  Also, can you please confirm
> the issue on a clean profile?  I'm curious if you have Firebug installed.

1) I checked with clean profile and it is working fine there
2) I have Firebug installed and tested it again in the problematic profile with Add-ons disabled; same result
3) Browser console
a) In the clean profile the console shows the message:
"Key event not available on some keyboard layouts: key="c" modifiers="accel,alt"1 - browser.xul"
b) In my default profile the browser console has no output when I press F12 (Add-ns disabled/enabled)

checked with:
48.0a2 (2016-05-03)
Flags: needinfo?(albert)
(Assignee)

Comment 5

a year ago
Oh. I think it is related to firebug. Do you still use it in your problematic profile?
We disable F12 shortcut if firebug is installed, and we also disable it if it is disabled, which is a bug. But looking at code before my patches, it looks like we weren't really disabling F12, so it may just be an unecessary piece of code..

If you are not using Firefox, could you try uinstalling it and see if that fixes it?
(Assignee)

Comment 6

a year ago
Created attachment 8752832 [details] [diff] [review]
patch v1

If that's really because of this code, we should just get rid of it.
I tried with/without Firebug installed. F12 key seems to be catched by firebug
and devtools don't open when firebug opens.
Attachment #8752832 - Flags: review?(jryans)
(Assignee)

Comment 7

a year ago
https://treeherder.mozilla.org/#/jobs?repo=try&revision=e7c778883973
Comment on attachment 8752832 [details] [diff] [review]
patch v1

Review of attachment 8752832 [details] [diff] [review]:
-----------------------------------------------------------------

It seems reasonable, but I think Honza should double check since he likely knows better about how this should be managed.
Attachment #8752832 - Flags: review?(jryans) → review?(odvarko)
Comment on attachment 8752832 [details] [diff] [review]
patch v1

Review of attachment 8752832 [details] [diff] [review]:
-----------------------------------------------------------------

I could only reproduce the problem when disabling Firebug and immediately (no Firefox restart) trying to open DevTools using F12. This is because the key is set/evaluated when the menus.js file loads and not updated after Firebug is disabled. It works again after Firefox restart. If this is the right scenario?

If yes, the patch looks good to me. Important thing is that if Firebug is installed & enabled it catches F12 instead of DevTools, which is key for the migration process/UI where Firebug users are guided to smoothly switch to DevTools.

Honza
Attachment #8752832 - Flags: review?(odvarko) → review+
(Reporter)

Comment 10

a year ago
(In reply to Alexandre Poirot [:ochameau] from comment #5)
> Oh. I think it is related to firebug. Do you still use it in your
> problematic profile?
> [...]
> If you are not using Firefox, could you try uinstalling it and see if that
> fixes it?

Done and that fixed the issue. In my initial test I assumed disabling all add-ons would have the same effect. Thanks everyone for checking this.
(Reporter)

Comment 11

a year ago
FYI, I am using Firebug 3

I did another test:
- re-installed the latest version from http://getfirebug.com/releases/firebug/3.0/
- F12 was working after installation had finished (no restart required)
- restarted FF and F12 again is not working anymore
- restarted again just to be sure with the same result
(Assignee)

Comment 12

a year ago
(In reply to Jan Honza Odvarko [:Honza] from comment #9)
> Comment on attachment 8752832 [details] [diff] [review]
> patch v1
> 
> Review of attachment 8752832 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> I could only reproduce the problem when disabling Firebug and immediately
> (no Firefox restart) trying to open DevTools using F12. This is because the
> key is set/evaluated when the menus.js file loads and not updated after
> Firebug is disabled. It works again after Firefox restart. If this is the
> right scenario?

Yes. That's the only thing I'm able to reproduce. But I wouldn't be surprised if this prefs gets out of control and keeps a reference to firebug somehow... That, I'm not able to reproduce.

> If yes, the patch looks good to me. Important thing is that if Firebug is
> installed & enabled it catches F12 instead of DevTools, which is key for the
> migration process/UI where Firebug users are guided to smoothly switch to
> DevTools.

Yes. I verified that. Firebug seems to be catching F12 before devtools codebase and prevents it from propagating.
(Assignee)

Comment 13

a year ago
https://hg.mozilla.org/integration/fx-team/rev/dcd0efa48687348cb9156ae5e297b86a04ee3046
Bug 1269237 - Stop disabling F12 shortcut when Firebug is installed. r=Honza

Comment 14

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/dcd0efa48687
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox49: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 49
Assignee: nobody → poirot.alex
You need to log in before you can comment on or make changes to this bug.