Closed Bug 1583671 Opened 4 months ago Closed 4 months ago

Errors thrown in workers are not being paused on

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(firefox71 fixed)

RESOLVED FIXED
Firefox 71
Tracking Status
firefox71 --- fixed

People

(Reporter: Harald, Assigned: bhackett1024)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

What were you doing?

  1. Open Debugger on https://firefox-devtools-tour.glitch.me/20190915/parity/#worker-debugging
  2. Make sure pause on exception is on
  3. Hit Spawn, then Make Error

What happened?

Nothing.

What should have happened?

Thrown error should be paused on, as in Chrome.

Thanks Harald for nice test case!

I can easily repro that on my Win machine.

@Brian, could you please take a look at this?

Honza

Flags: needinfo?(bhackett1024)
Priority: -- → P3
Has STR: --- → yes

There are a couple problems here. First, a small bug in the server (not having access to Cr in worker threads) causes us to not properly pause when the exception is thrown. Fixing that allows pausing on exceptions to work, but only when clicking the pause-on-exceptions checkbox after the worker has started. The second problem is that newly created workers are not given options reflecting the client's current pause-on-exceptions state (and other state, like skip-pausing). There is some code in toolbox.js with a bunch of options used when attaching to the main thread. I didn't want to copy-paste that stuff, so this patch adds plumbing so the debugger can get the default options for new threads from the toolbox. The latter uses the preferences state instead of reducer state, but since we update the prefs at the same time as the reducer this shouldn't be a problem, and workers should always be able to pause on exceptions as expected.

Flags: needinfo?(bhackett1024)

Here is the revision btw. I used moz-phab to submit this but the processing pipeline seems to have either failed somewhere or is just taking a really long time.

https://phabricator.services.mozilla.com/D47320

Pushed by bhackett@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/213ffedf9fc0
Allow pausing on exceptions in workers, r=jlast.
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 71
Assignee: nobody → bhackett1024
Regressions: 1571863
Duplicate of this bug: 1581825
Regressions: 1586297
You need to log in before you can comment on or make changes to this bug.