Closed Bug 1642295 Opened 4 years ago Closed 4 years ago

Enable console message listening from the server side for tab targets

Categories

(DevTools :: Console, enhancement)

enhancement

Tracking

(Fission Milestone:M6c, firefox81 fixed)

RESOLVED FIXED
81 Branch
Fission Milestone M6c
Tracking Status
firefox81 --- fixed

People

(Reporter: ochameau, Assigned: jdescottes)

References

(Depends on 1 open bug, Blocks 2 open bugs, Regressed 1 open bug)

Details

(Whiteboard: dt-fission-m2-mvp)

Attachments

(8 files)

Bug 1620243 will land all the necessary code to listen for console messages via the ResourceWatcher API and the WatcherActor.
But this new code isn't enabled by default yet. The traits to enabled it on the WatcherActor is false.
This is to allow changing the server API/behavior without thinking about backward compat.
But we should toggle this to true by default and get rid of the old codepath eventually.

Before enabing it, we should:

  • digest this new code a bit, to see if there is any esthetical change to be made,
  • investigate network event and/or storage resource listening. There resources have to be listened from the parent process and may require some API changes,
  • and may be also try converting one another resource, by someone else than me, to see if there is any improvement to be made to the public API of the WatcherActor.
Whiteboard: dt-fission-m2-mvp
Blocks: 1642296

Note: we should remove some code from devtools/server/actors/resources/console-message.js:onLogPoint that used to support the case where we aren't using the WatcherActor and have a logpoint.

Tracking dt-fission-m2-mvp bugs for Fission Nightly milestone (M6c).

Fission Milestone: --- → M6c
Summary: Enable console message listening from the server side → Enable console message listening from the server side for tab targets
Blocks: 1657101
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED

Depends on D86963

Just for reference for now, since this is incompatible with target switching.

Attachment #9169842 - Attachment description: Bug 1642295 - [WIP] Support target switching + resources → Bug 1642295 - Stop and start resource listening when switching targets
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a43868a44c5e
Add missing Cu import in devtools/server/actors/object/utils.js r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/02b34e34605a
Fix shouldHandleMessage signature in platform-message DevTools resource r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/d85ccd9b7e22
Fold clearCachedMessage from ConsoleServiceListener into WebConsoleActor r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/e51e4431b577
Do not check property order in WebConsole stub tests r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/e2320c4219df
Enable server side resource watching by default r=ochameau
https://hg.mozilla.org/integration/autoland/rev/751c328cd945
Stop and start resource listening when switching targets r=ochameau

I noticed after this https://phabricator.services.mozilla.com/D86964 landed, I no longer see logs in the browser console while the multi processes debugger is open.

You can test it with a console.log in the debugger.

Trying to make this clear steps to test for what I'm hitting and how I test it:

  1. Using current master, and open it with the multi process debugger open, I do this via ./mach run --jsdebugger -P the --jsdebugger part is the important part, but I suspect there are other ways to open it, what's important though is the multi process debugger is open when you start the browser.
  2. I created a new profile for testing this, but I suspect it doesn't matter.
  3. Once I'm in the browser, I open an about:home tab, but I suspect the page doesn't matter.
  4. From here I do ctrl+shift+k to open the browser console.
  5. Inside the console, I enter console.log("hi"); and hit enter.

Attaching expected and actual screenshots.

Attached image actual.png (deleted) —
Attached image expected.png (deleted) —
Depends on: 1661569
Blocks: 1663706
Regressions: 1664493
No longer depends on: 1661569
Regressions: 1661569
Depends on: 1661569
No longer regressions: 1661569
Regressions: 1660776
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: