Closed Bug 1770363 Opened 2 years ago Closed 2 years ago

Allow the browser toolbox to enable/disable multiprocess behavior on-demand

Categories

(DevTools :: Framework, enhancement)

enhancement

Tracking

(firefox103 fixed)

RESOLVED FIXED
103 Branch
Tracking Status
firefox103 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Depends on 1 open bug, Blocks 3 open bugs)

Details

Attachments

(6 files, 1 obsolete file)

This would allow the user to better focus on only the main process if they don't debug anything from the content processes.
This sounds like a workaround for performance reason, but associated with some other similar filtering, this would allows the user to better focus on exactly what they are debugging.
A simple first approach would add yet another toggle alongside "show content process message" and "enable network request listening".
But ideally we would revamp the iframe dropdown to be a control panel allowing to focus on a particular part of the browser. This would make the browser toolbox much faster by inspecting less resources and also more readable by showing less content and show the content the user cares about.

Blocks: 1772310
Assignee: nobody → poirot.alex
Attachment #9277442 - Attachment description: Bug 1770363 - [devtools] Implement on-demand multiprocess browser toolbox. → Bug 1770363 - [devtools] Implement on-demand multiprocess debugging in TargetCommand API.

This introduces a checkbox in the iframe dropdown to enable/disable multiprocess debugging live.
Switching between:

  • debugging only the main process (all documents, workers and priviledged JS)
  • debugging all the processes (same, for each process, we will debug documents, workers, JS, ...)

This helps significantly speed up the browser toolbox when debugging only parent process resources,
while still allowing to switch to debug everything when required.

Depends on: 1773340

This only fail on MBT because it still uses non-EFT
and the top level document is displayed in the iframe dropdown
via the old "listFrames/frameUpdate" codepath.
So that its frameData's id isn't related to a target actor
but rather to a frame of the parent-process/window-global target actor...

I'm adding test coverage for the regular web toolbox,
but the fix only reproduce in the context of the browser toolbox.

When passing an array, only booleans and number were accepted.
Also arrays were stringified to list of value coma separated,
as if arrays were refering to list of arguments.
That while passing a primitive value would be passed as a unique argument.

Clarify this by explicitely accepting arrays refering as list of argument,
or a primitive value being a unique argument.

I'm also fixing an issue with exceptions not being correctly reported.

This add some minimal test coverage for the UI bits.

But more detailed test should rather be done around the TargetCommand API (browser_target_command_scope_flag.js).

Blocks: 1774646

Comment on attachment 9280074 [details]
Bug 1770363 - [devtools] Toggle multiprocess mode from the evaluation context selector.

Revision D148528 was moved to bug 1774646. Setting attachment 9280074 [details] to obsolete.

Attachment #9280074 - Attachment is obsolete: true
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5cdcd2318a9f
[devtools] Implement on-demand multiprocess debugging in TargetCommand API. r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/18a6433fd24a
[devtools] Introduce on-demand multiprocess browser toolbox. r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/27e78762006f
[devtools] Allow to pass any JSON value to ToolboxTask.spawn. r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/a91879be9b4a
[devtools] Cover browser toolbox scope feature with a test around the iframe dropdown. r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/d29f5041fd98
[devtools] Fix iframe dropdown on target destruction from the MBT r=nchevobbe

Backed out for causing mochitest failures on browser_ext_addon_debugging_netmonitor.js

Backout link
Push with failures
Link to failure log
Failure line :
TEST-UNEXPECTED-FAIL | browser/components/extensions/test/browser/browser_ext_addon_debugging_netmonitor.js | leaked 3 window(s) until shutdown [url = about:blank]

Flags: needinfo?(poirot.alex)
Flags: needinfo?(poirot.alex)
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7c409831fd65
[devtools] Implement on-demand multiprocess debugging in TargetCommand API. r=nchevobbe,rpl
https://hg.mozilla.org/integration/autoland/rev/d3db0ae3be2e
[devtools] Introduce on-demand multiprocess browser toolbox. r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/de1150e010e7
[devtools] Allow to pass any JSON value to ToolboxTask.spawn. r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/f064334afbb9
[devtools] Cover browser toolbox scope feature with a test around the iframe dropdown. r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/0c6d39a1c5d1
[devtools] Fix iframe dropdown on target destruction from the MBT r=nchevobbe
Depends on: 1775503
Depends on: 1776250
Regressions: 1777253
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: