Closed Bug 1575240 Opened 3 months ago Closed 3 months ago

inspect(x) should show x in the appropriate panel

Categories

(DevTools :: Console, enhancement, P1)

enhancement

Tracking

(firefox71 fixed)

RESOLVED FIXED
Firefox 71
Tracking Status
firefox71 --- fixed

People

(Reporter: jlast, Assigned: jlast)

References

Details

(Keywords: parity-chrome)

Attachments

(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
Status: NEW → ASSIGNED
Priority: -- → P1
Pushed by jlaster@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3853d8979a55
inspect(x) should show x in the appropriate panel. r=nchevobbe
Duplicate of this bug: 1503475
Pushed by jlaster@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d870fdbf200f
inspect(x) should show x in the appropriate panel. r=nchevobbe
Pushed by jlaster@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/74fce607d8a7
inspect(x) should show x in the appropriate panel. r=nchevobbe
Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0667a378d933
inspect(x) should show x in the appropriate panel (fix lint). r=jlast
Backout by nerli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/776a6309e975
Backed out 2 changesets for failures in browser_inspector_menu-06-other.js CLOSED TREE
Pushed by jlaster@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/204d32b36d7e
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

Backout: https://hg.mozilla.org/integration/autoland/rev/4bed9794caf24942c017d05a0d24c2c7086d3c98

Failure push: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=204d32b36d7e2e2e06126b3b08015e4cca2134d8

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=264388496&repo=autoland&lineNumber=5478

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 jlaster@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8dbe3fbe3884
inspect(x) should show x in the appropriate panel. r=nchevobbe
Status: ASSIGNED → RESOLVED
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.