Bug 145930 - Web Inspector: Debugger option to "Pause on Promise reject"
Summary: Web Inspector: Debugger option to "Pause on Promise reject"
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-06-12 10:26 PDT by James Burke
Modified: 2017-04-27 20:39 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Burke 2015-06-12 10:26:18 PDT
Debugging with promises and finding original sources of errors can be tricky if the reject pathway is followed.

Since promises are a control flow mechanism with the resolve() used to go to the next step, and reject() like throwing an exception, it seems useful if the debugger had the ability to pause if the reject() for a promise was called.

This is different than pausing on an unhandled promise rejection. The scenario I was debugging was one where there were proper error handling listeners on the promise chain, but since there were a few places in the chain where reject() was called, it was not immediately obvious where I could manually place a breakpoint to inspect the local state to see why the reject was called.

This bug may have some dependency with bug 139542, which is about showing more options on what to break on.

Similar issue filed for Gecko: https://bugzilla.mozilla.org/show_bug.cgi?id=1174026
Comment 1 Radar WebKit Bug Importer 2015-06-12 10:27:02 PDT
<rdar://problem/21360173>