New issue
Advanced search Search tips

Issue 601565 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Jul 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

SharedWorkers not showing up in the dev tools

Reported by freshene...@gmail.com, Apr 7 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36

Steps to reproduce the problem:
1. Create the following two files:

a.html:

<body>
<div id='a'></div>

</body>
<script>
    var myWorker = new SharedWorker("sharedWorker.js")
    myWorker.port.start()

    myWorker.port.onmessage = function(result) {
        console.dir(result)
        document.getElementById('a').innerText = result.data
    }

    var data = Math.random()
    myWorker.port.postMessage([data])

</script>

sharedWorker.js:

var sharedData

onconnect = function(e) {
    var port = e.ports[0]
    port.addEventListener('message', function(e) {
        if(sharedData === undefined) {
            sharedData = e.data
            port.postMessage('Wrote: '+ e.data)
        } else {
            port.postMessage(sharedData)
        }

    })

    port.start()
}

2. Serve them from a web server
3. Access a.html and look in Sources

What is the expected behavior?
The SharedWorker should appear under Sources

What went wrong?
It doesn't show up

Did this work before? N/A 

Chrome version: 49.0.2623.110  Channel: n/a
OS Version: 6.3
Flash Version: Shockwave Flash 21.0 r0
 
Owner: pfeldman@chromium.org
Status: Assigned (was: Unconfirmed)
Status: WontFix (was: Assigned)
We don't surface shared workers inside the page tools since they formally live outside of the page. We did implement it for service workers and you should actually use those.
Um, pfeldman, how are you supposed to debug SharedWorkers if they don't appear in *any* page's dev tools? Do they have their own dev tools? Are you saying SharedWorkers *shouldn't* have a way to be debugged? I'm pretty confused by your offhand dismissal of this.

Service workers look cool, but unless SharedWorkers is deprecated, they really have nothing to do with this bug.
Oh, sorry, I did not point you to chrome://inspect that have dedicated devtools instances for the shared workers.
Ah, I'll try that out next time. Thanks!

Sign in to add a comment