"Inspect in react" context menu
I don't know if this would be possible, but it would be awesome if there were a way to select a component on the page and have it jump to that component in the tools a la the normal chrome "inspect element":

Imagine if there was an "inspect in react" option!
I don't believe this is possible, but if you inspect element and then switch to the React tab, it should select the right component automatically!
Extensions can add items to the context menu, and I think I remember @sebmarkbage opting not to do it for the original extension to avoid clutter. but I'd be open to it -- would certainly cut two steps down to one
I don't want to show it on non-React pages but if we can do it without that then I'm in favor.
Hey @jaredly thanks for the info about switching tabs to inspect the element. That alone is a big help! I'd still be in favor an "inspect in react" option, but I don't think it is as urgent now that I know the other method. Thanks again!
I don't believe either opening devtools from background or content scripts, nor opening a specific panel programmatically (say when devtools is already open) are possible at this time. I looked through the chrome.devtools APIs and couldn't find anything.
I don't want to show it on non-React pages but if we can do it without that then I'm in favor.
Having it only on React pages should be easy: you'd listen on tab changes and add or remove the context menu item based on the page. But that seems moot from what I can tell.
I'd be happy to be proven wrong though :smile:
edit: granted, I looked at Chrome only. Maybe other browsers let you do it…
I know Redux DevTools does add something to the context menu (see screenshot below), but I don't think it's quite the same thing being asked for here.
That said, I really want this feature.
Redux DevTools context menu:
@jrnail23 I just checked it out and it's not the same thing indeed. All the five options displayed above open a separate browser window, not a panel in Chrome DevTools. ("Open in a chrome panel" made me hopeful but I checked the source code as well, and it just opens a window)
Closing as it doesn't seem possible. Let me know if I'm wrong and we'll reopen.
If you're open for a good ol' hack, this has been working for me 😁

Prereq: Better Touch Tool ❤️
-
Select [or add] Chrome to the application pane on the left
-
Select desired trigger (for me in the above image, it's keyboard)
-
Set trigger (for me cmd+shift+option+r) to trigger context menu item
-
In resultant input box, do this:

-
Attach 2 additional actions by clicking "Attach additional action" button on the bottom right
-
Set 1st additional action -> delay by 0.6 (might vary depending on your computer)
-
Set 2nd additional action -> cmd + ]
-
Profit