New issue
Advanced search Search tips

Issue 858696 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 24
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Cannot debug web worker when the sources of the main window and the worker are the same

Project Member Reported by yossik@google.com, Jun 28 2018

Issue description

UserAgent: Mozilla/5.0 (X11; CrOS x86_64 10452.99.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.203 Safari/537.36

Steps to reproduce the problem:
I have a code written in typescript that I compile to two binaries. 1 - For main window page and 2 - for web worker

The web worker and the main window share some classes.
there are source maps for the two binaries.

when I set a breakpoint on one of the shared classes it always breaks only on the main page which means that I cannot debug it on the worker.

What is the expected behavior?
I would like it to break in both contexts (ideally I could choose which context)

What went wrong?
it breaks only on the main window.

Did this work before? N/A 

Chrome version: 66.0.3359.203  Channel: n/a
OS Version: 10452.99.0
Flash Version:
 
Owner: kozy@chromium.org
Status: Assigned (was: Unconfirmed)
Thanks for the report, I'm able to reproduce.  Despite showing up as 2 'tabs' in the Sources panel, a single script that is shared between the main page and a worker behaves strangely.

Setting a breakpoint in one will set a breakpoint in the other, since they have the same URL.  I'm not sure whether it's feasible to tie breakpoints into execution contexts for this scenario.
One option is to break in both execution contexts.
Another is to add an option to the breakpoint itself to choose which execution contexts should be used (default will be for both)
Status: Fixed (was: Assigned)
I landed some CLs that should fix this one and I checked it in latest Canary and it looks fixed.
Feel free to file another issue if it is not.

Sign in to add a comment