Bug 145930

Summary: Web Inspector: Debugger option to "Pause on Promise reject"
Product: WebKit Reporter: James Burke <jrburke>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: graouts, inspector-bugzilla-changes, jonowells, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=150358

James Burke
Reported 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
Attachments
Radar WebKit Bug Importer
Comment 1 2015-06-12 10:27:02 PDT
Note You need to log in before you can comment on or make changes to this bug.