This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 253690

Summary: Debugger does not stop on a breakpoint in a web worker
Product: javascript Reporter: Jan Stola <jstola>
Component: DebuggerAssignee: Martin Entlicher <mentlicher>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

Description Jan Stola 2015-07-23 14:41:51 UTC
Test case:

echo.js file:

self.addEventListener('message', function(e) {
  var data = e.data;
  self.postMessage('Echo: '+data);
}, false);

index.html file:

<!DOCTYPE html>
<html>
    <head>
        <title>Web Worker Test</title>
    </head>
    <body>
        <div>Message: <input id="field" type="text"><button onclick="send()">Send</button></div>
        <span id="output"></span>
        <script>
            worker = new Worker('echo.js');
            worker.addEventListener('message', function(e) {
                document.getElementById('output').innerHTML = e.data;
            });
            send = function() {
                var text = document.getElementById('field').value;
                worker.postMessage(text);
            };
        </script>
    </body>
</html>

Steps to reproduce:
1. Place a breakpoint into the callback in echo.js file.
2. Run index.html in Chrome with NetBeans Connector.
3. Type some text into the field in the page and press Send button
   => web worker's code is performed but the debugger does not stop there

Note that this scenario works when Chrome Developer Tools are used.