Open Bug 1607778 Opened 6 years ago Updated 3 years ago

Debugging support for Shared Workers

Categories

(DevTools :: Debugger, enhancement, P5)

enhancement

Tracking

(Not tracked)

People

(Reporter: Harald, Unassigned)

References

(Blocks 1 open bug)

Details

User Story

When debugging shared workers, I want to see them in the threads panel, so that I can debug them.

Attachments

(4 files)

Attached patch patchSplinter Review

This patch shows shared workers in the debugger's threads pane, if the new devtools.debugger.features.windowless-shared-workers preference is set.

This is pretty straightforward, but there is a question here of which shared workers should be shown in the debugger. Unlike service workers, tabs have to explicitly connect with a shared worker by creating it, but information about these connections isn't exposed in IDLs as far as I can see. This patch avoids this issue by showing all shared workers that are same-origin with the tab being debugged, similar to what we do with service workers. This should give a pretty good result while avoiding difficulties managing the state around which tabs are connected to which shared workers.

Assignee: nobody → bhackett1024

Honza: Not sure how bad bitrot will be here and how much work is still needed. Could you assess if we should park it for later or give it the nudge it needs now?

Assignee: bhackett1024 → nobody
Flags: needinfo?(odvarko)

Baku, would you know if we can/how hard it would be to expose the windows a given SharedWorker lives in, in the WorkerDebugger ?
The idea would be able to properly display the shared worker in the debugger and in the console evaluation context selector, in the content toolbox.

Flags: needinfo?(amarchesini)

We could expose the list of window IDs. Is it enough?

Flags: needinfo?(amarchesini)

yeah, I think that it would be great

Asuth, is it something you (or the worker/storage team) have time to work on?

Flags: needinfo?(bugmail)

Yes, I file bug 1657130 to cover implementing this and will share it at our team meeting today.

Flags: needinfo?(bugmail)

Nicolas, Andrew, thanks for helping with this one!

Flags: needinfo?(odvarko)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: