Summary: | Web Inspector: Can't resume Debugger after breaking on exception in Promise | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Timothy Hatcher <timothy> | ||||
Component: | Web Inspector | Assignee: | Joseph Pecoraro <joepeck> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bburg, commit-queue, graouts, joepeck, mark.lam, mattbaker, nvasilyev, timothy, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Timothy Hatcher
2016-04-30 18:00:52 PDT
You might also need to click continue a couple times to get the console.log to appear. Then further continues will log the error in the Inspector. We need to make sure the debugger UI never gets out of sync with the backend, which is what appears to be happening here. You can use the Inspector when it is in this state, but a developer will think the page is still pauses and will be confused. The issue is due to the DebuggerManager not resuming the backend when it resumed the front end: In the test case, a Promise throws an exception on rejection. Since this is in builtin code, the DebuggerManager detects that there are no active frames on the stack, and chooses to resume the front-end. Unfortunately, it did not resume the back end as well. As a result, the backend sits in its event loop perpetually. A patch with the fix is coming shortly. (In reply to comment #3) > The issue is due to the DebuggerManager not resuming the backend when it > resumed the front end: > > In the test case, a Promise throws an exception on rejection. Since this is > in builtin code, the DebuggerManager detects that there are no active frames > on the stack, and chooses to resume the front-end. Unfortunately, it did > not resume the back end as well. As a result, the backend sits in its event > loop perpetually. > > A patch with the fix is coming shortly. Correction: there's more to this than what we thought above. With the explicit call to the resume the backend, the backend does get resumed. However, the front end still looks like it is stopped on a breakpoint. Joe suggested, for a test, that I change the bail check at the top of DebuggerManager's _didResumeInternal() to "if (!this._paused) return". With that plus the explicit call to DebuggerAgent.resume() added to debuggerDidPause(), the issue appears to be resolved. That said, I'm not sure that this is the proper fix though. Sending this bug over to Joe since the bug appears to be at the Inspector level. Created attachment 279467 [details]
[PATCH] Proposed Fix
Comment on attachment 279467 [details] [PATCH] Proposed Fix Clearing flags on attachment: 279467 Committed r201211: <http://trac.webkit.org/changeset/201211> All reviewed patches have been landed. Closing bug. |