Closed Bug 1575240 Opened 3 months ago Closed 3 months ago

inspect(x) should show x in the appropriate panel


(DevTools :: Console, enhancement, P1)



(firefox71 fixed)

Firefox 71
Tracking Status
firefox71 --- fixed


(Reporter: jlast, Assigned: jlast)



(Keywords: parity-chrome)


(1 file, 1 obsolete file)

chrome devtools docs has a good description of how their inspect command works.

inspect(object/function) opens and selects the specified element or object in the appropriate panel: either the Elements panel for DOM elements or the Profiles panel for JavaScript heap objects.

From my experience, the feature is very common for devtools extension authors trying to add links in their UI to the elements panel and debugger. I noticed this yesterday because the new react devtools uses this and it fails in Firefox.

For what it is worth, I believe chrome's dir(object) command is equivalent to how we use inspect.

Keywords: parity-chrome

There's a toolbox function that the console don't use: devtools/client/framework/toolbox.js#3414-3439

It does at least select the inspector when we're dealing with an element. I guess this should be augmented to make it works for the React DevTools.

Harald, how urgent does this look?

Flags: needinfo?(hkirschner)

Since this causes failures in the new React Devtools, it makes it high on the list. Seems like the fix could be pretty simple as well, so it would be nice to get it into 70.

Flags: needinfo?(hkirschner)
Assignee: nobody → jlaster
Priority: -- → P1
Pushed by
inspect(x) should show x in the appropriate panel. r=nchevobbe
Duplicate of this bug: 1503475
Pushed by
inspect(x) should show x in the appropriate panel. r=nchevobbe
Pushed by
inspect(x) should show x in the appropriate panel. r=nchevobbe
Pushed by
inspect(x) should show x in the appropriate panel (fix lint). r=jlast
Backout by
Backed out 2 changesets for failures in browser_inspector_menu-06-other.js CLOSED TREE
Pushed by
inspect(x) should show x in the appropriate panel. r=nchevobbe

Backed out changeset 204d32b36d7e (bug 1575240) for frequently failing devtools at devtools/client/inspector/test/browser_inspector_menu-06-other.js


Failure push:

Failure log:

task 2019-08-31T07:27:55.314Z] 07:27:55 INFO - TEST-PASS | devtools/client/inspector/test/browser_inspector_menu-06-other.js | The duplicated node should be in the markup. -
[task 2019-08-31T07:27:55.314Z] 07:27:55 INFO - Getting the markup-container for node .duplicate + .duplicate
[task 2019-08-31T07:27:55.314Z] 07:27:55 INFO - Buffered messages finished
[task 2019-08-31T07:27:55.315Z] 07:27:55 INFO - TEST-UNEXPECTED-FAIL | devtools/client/inspector/test/browser_inspector_menu-06-other.js | Found markup-container for selector: .duplicate + .duplicate -
[task 2019-08-31T07:27:55.315Z] 07:27:55 INFO - Stack trace:
[task 2019-08-31T07:27:55.315Z] 07:27:55 INFO - chrome://mochikit/content/browser-test.js:test_ok:1580
[task 2019-08-31T07:27:55.315Z] 07:27:55 INFO - chrome://mochitests/content/browser/devtools/client/inspector/test/head.js:getContainerForSelector:308
[task 2019-08-31T07:27:55.315Z] 07:27:55 INFO - chrome://mochitests/content/browser/devtools/client/inspector/test/browser_inspector_menu-06-other.js:testDuplicateNode:69
[task 2019-08-31T07:27:55.315Z] 07:27:55 INFO - chrome://mochitests/content/browser/devtools/client/inspector/test/browser_inspector_menu-06-other.js:null:14
[task 2019-08-31T07:27:55.315Z] 07:27:55 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1350
[task 2019-08-31T07:27:55.316Z] 07:27:55 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1385
[task 2019-08-31T07:27:55.316Z] 07:27:55 INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1213
[task 2019-08-31T07:27:55.316Z] 07:27:55 INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:805
[task 2019-08-31T07:27:55.316Z] 07:27:55 INFO - Not taking screenshot here: see the one that was previously logged

Attachment #9089201 - Attachment is obsolete: true
Pushed by
inspect(x) should show x in the appropriate panel. r=nchevobbe
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 71
Flags: needinfo?(jlaster)
Regressions: 1577960
You need to log in before you can comment on or make changes to this bug.