Closed Bug 1612276 Opened 3 years ago Closed 3 years ago

Add "Reveal in Inspector" context menu entry on elements


(DevTools :: Console, enhancement, P4)

72 Branch


(firefox76 fixed)

Firefox 76
Tracking Status
firefox76 --- fixed


(Reporter: jakub.g.opensource, Assigned:, Mentored)



(Keywords: dev-doc-complete)


(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0

Steps to reproduce:

  1. Open devtools > console on any page
  2. Run document.querySelectorAll('*'). It gives you a NodeList.
  3. Right click any element on the NodeList

Actual results:

You get a menu with several items, but there's no equivalent of "Reveal in Elements Panel" from Chrome

Expected results:

There should be an item which reveals the node in Inspector

Chrome equivalent has been there for years:

Component: Untriaged → Console
Product: Firefox → DevTools
Hardware: Unspecified → All

This sounds like a little thing but it's a super important feature when dealing with complex DOMs and great simplifies work.
(I'm rather surprised no one reported this yet, but it's one of things that keeps me coming back to Chrome devtools).

Attached image icon

Hello, thanks for reporting this!

There's an icon next to DOM nodes in console (and in several other places in devtools), that would take you to the inspector when clicked.
This looks quite similar to what you're asking.
Am I missing something?

Flags: needinfo?(jakub.g.opensource)

Well you're right. Now that you told me it's obvious. I think I even used this in the past on several occasions, but forgot about it.

Up to you to decide if menu entry could be added, or this bug should be closed.

Flags: needinfo?(jakub.g.opensource)

I guess we could have that, although it feels a bit redundant?
I'm not really sure.
What do you think Harald?

Flags: needinfo?(hkirschner)
Priority: -- → P4

I don't mind redundant context menus as they reduce surprises and allow discovery of all options.

Right-clicking a DOM element should even expose the same menu as the Inspector (does in Chrome), as removed elements otherwise can't be interacted with.

Flags: needinfo?(hkirschner)
Mentor: nchevobbe
Summary: Console: Add "Reveal in Inspector " (like Reveal in Elements panel in Chrome) → Add "Reveal in Inspector" context menu entry on elements

Hi, I would like to work on this as my first bug. Can I ask you if I have any questions?

hello Patricia, you sure can do :)

If it's your first bug, you might want to read this to setup the work environment.
Make sure to select "Artifact builds" when asked as it speeds up the workflow quite a bit :)
Also, you can come and chat on our Slack

Don't hesitate to ask anything!

If it's okay with Patricia, can I work on adding this feature?

Patricia if you're looking to contribute for the first time, this could help you out in finding good first bugs

Hi KC, I have already started working on this feature. Thanks for asking.

Assignee: nobody →
Pushed by
Add Reveal in Inspector context menu entry on elements. r=nchevobbe
Blocks: 1621042
Ever confirmed: true
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 76

Context menu options in the console were not documented at all (that I could find). So I added the general ones to the intro of Console messages and this to the Interpreter input/output subsection.

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