Closed Bug 1583671 Opened 4 months ago Closed 4 months ago

Errors thrown in workers are not being paused on


(DevTools :: Debugger, defect, P3)



(firefox71 fixed)

Firefox 71
Tracking Status
firefox71 --- fixed


(Reporter: Harald, Assigned: bhackett1024)


(Blocks 1 open bug)



(1 file)

What were you doing?

  1. Open Debugger on
  2. Make sure pause on exception is on
  3. Hit Spawn, then Make Error

What happened?


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?


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.

Pushed by
Allow pausing on exceptions in workers, r=jlast.
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.