Closed
Bug 1209353
Opened 9 years ago
Closed 5 years ago
[meta] Worker debugger console do not work
Categories
(DevTools :: Console, task)
DevTools
Console
Tracking
(firefox44 affected)
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
firefox44 | --- | affected |
People
(Reporter: canuckistani, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
(Keywords: meta)
ER: if I'm at a breakpoint in worker code, I should be able to use the console
AR: the console is dead, nothing happens. Scratchpad is also dead, eg running `console.log(this)` gets nothing.
Updated•9 years ago
|
Blocks: sw-devtools
Comment 1•9 years ago
|
||
As discussed, I've started to investigate why the console isn't working with workers. A rough outline:
The primary failure is that there is no WebConsoleActor being created for the worker's debugger server connection - right now only a ThreadActor is being created: https://dxr.mozilla.org/mozilla-central/source/devtools/server/worker.js#57
* The webconsole frontend blows up because it's expecting an actor ID at target.form.consoleActor for its call to attachConsole (https://dxr.mozilla.org/mozilla-central/source/devtools/client/webconsole/webconsole.js#5035)
In order to load the WebConsoleActor in the worker scope it's going to require some changes.
* There need to be some cosmetic changes with loading in the WebConsoleActor: https://dxr.mozilla.org/mozilla-central/source/devtools/server/actors/webconsole.js. Also just general fixes (call DevToolsUtils.reportException instead of Cu.reportError, etc)
* What's going to be trickier is making WebConsoleUtils work (which is imported into the console actor). This file relies on Services / XPCOM stuff to add console listeners . For example, to listen to console api messages, it needs to listen to Services.obs.addObserver(this, "console-api-log-event", false): https://dxr.mozilla.org/mozilla-central/source/devtools/shared/webconsole/utils.js#1373.
** I think we need to do some trickery with rpc to the main thread like what fetch is doing: https://dxr.mozilla.org/mozilla-central/source/devtools/shared/DevToolsUtils.js#637-646. Only this will be more complex since we'll need to rpc to set up the listeners, then be notified of updates with unsolicited events to the worker. And the main thread console listeners will need to do some of what the WCA is currently doing, like preparing the message for remote since the listeners currently pass around instances of nsIConsoleMessage / nsIScriptError etc.
* REPL is easier since it's mostly protocol stuff and not services. I'm seeing some progress on this front, like being able to run REPL commands when not paused at a frame.
Assignee: nobody → bgrinstead
Updated•9 years ago
|
Status: NEW → ASSIGNED
Updated•9 years ago
|
Keywords: meta
Summary: Worker debugger console / scratchpad do not work → [meta] Worker debugger console / scratchpad do not work
Updated•9 years ago
|
Assignee: bgrinstead → nobody
Status: ASSIGNED → NEW
Comment 2•9 years ago
|
||
Turning this into the meta bug for making the console work in the worker debugger.
Comment 3•9 years ago
|
||
This is not really part of the Push DevTools for Dev. Edition 47, so I'm unblocking said meta-bug.
No longer blocks: 1214248
Updated•9 years ago
|
Updated•6 years ago
|
Product: Firefox → DevTools
Updated•6 years ago
|
Blocks: dt-service-worker
Updated•6 years ago
|
Type: defect → task
Comment 4•5 years ago
|
||
The issue reported here is fixed, console is working for workers.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•