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 - Debugger does not stop on a breakpoint in a web worker
Summary: Debugger does not stop on a breakpoint in a web worker
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-23 14:41 UTC by Jan Stola
Modified: 2015-07-23 14:41 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.