Closed Bug 1269237 Opened 8 years ago Closed 8 years ago

Unable to Open Developer Tools with F12 shortcut

Categories

(DevTools :: General, defect, P1)

48 Branch
x86_64
Windows 10
defect

Tracking

(firefox49 fixed)

RESOLVED FIXED
Firefox 49
Tracking Status
firefox49 --- fixed

People

(Reporter: alberts, Assigned: ochameau)

Details

(Whiteboard: [btpp-fix-now])

Attachments

(1 file)

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).
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]
(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)
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?
Attached patch patch v1Splinter Review
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)
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+
(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.
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
(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.
https://hg.mozilla.org/integration/fx-team/rev/dcd0efa48687348cb9156ae5e297b86a04ee3046
Bug 1269237 - Stop disabling F12 shortcut when Firebug is installed. r=Honza
https://hg.mozilla.org/mozilla-central/rev/dcd0efa48687
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 49
Assignee: nobody → poirot.alex
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: