Closed Bug 1368680 Opened 7 years ago Closed 5 years ago

source-map logs coming from a worker

Categories

(DevTools :: Framework, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: tromey, Unassigned)

References

(Blocks 1 open bug)

Details

Currently the location of a console.log in a worker won't be source-mapped. I believe this holds for any event occurring in a worker, for example an XHR in a worker won't have a source-mapped location in the network monitor. The main problem here is that source-map-url-service relies on the actor to pass along the source map URL. However, workers don't cause these actors to be created. Test case here: https://tromey.github.io/source-map-examples/worker/index.html Source code here: https://github.com/tromey/source-map-examples
Also see bug 1385032, where source map errors in workers are probably not reported correctly.
Product: Firefox → DevTools

This should be working now because of our "windowless-workers" work last year. Since workers and main-thread scripts are now debuggable in the same window, the debugger has the actors loaded in the debugger. We can't currently map actor IDs directly because we still have the issue that the worker server has the source actors but the main-thread server has the console messages, but by loading everything in the same debugger, the debugger is at least able to open the correct file 99% of the time by matching the file URLs, and the edge cases around that should eventually be addressed by https://bugzilla.mozilla.org/show_bug.cgi?id=1592584 when we stop cloning console messages across threads/servers.

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.