Bug 139542

Summary: Web Inspector: Add toggles for debugger pauses at console.assert failures
Product: WebKit Reporter: Brian Burg <burg>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, graouts, joepeck, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix
timothy: review+
[IMAGE] Pause on Assertion Failures Global Breakpoint none

Description Brian Burg 2014-12-11 09:48:40 PST
The debugger; statement will always pause if the inspector is open. It would be nice to have a toggle for that.

Perhaps we need two sections: one for "Debugger Pause Options" and another for "Breakpoints" ?
Comment 1 Joseph Pecoraro 2014-12-11 12:24:45 PST
I agree. We overload "Pause on All Exceptions" to mean a lot. Currently it:

  - pauses on console.assert failures
  - pauses on CSP (Content Security Policy) violations

These distinct issues could be pulled out to be their own toggles alongside a toggle for "debugger" statements.

Something else to keep in mind. DOMDebugger events still need a place to go:

  - pause on DOM events (click, touch, mouse, key, input, orientation, geolocation, ...)
  - pause on DOM errors (XHR failure, WebSQL errors, IndexedDB error)
  - pause on Promise lifetimes (rejection, resolved/fulfilled)
Comment 2 Radar WebKit Bug Importer 2014-12-17 11:25:20 PST
<rdar://problem/19281600>
Comment 3 Joseph Pecoraro 2016-10-13 22:29:37 PDT
I was getting sick of pausing at assertion failures so I added a global breakpoint for Assertion Failures.
Comment 4 Joseph Pecoraro 2016-10-13 22:34:03 PDT
Created attachment 291570 [details]
[PATCH] Proposed Fix
Comment 5 Joseph Pecoraro 2016-10-13 22:34:48 PDT
Created attachment 291571 [details]
[IMAGE] Pause on Assertion Failures Global Breakpoint
Comment 6 Timothy Hatcher 2016-10-14 15:46:03 PDT
Comment on attachment 291570 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=291570&action=review

Cool!

> Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js:110
>          this._allUncaughtExceptionsBreakpointTreeElement = new WebInspector.BreakpointTreeElement(WebInspector.debuggerManager.allUncaughtExceptionsBreakpoint, WebInspector.DebuggerSidebarPanel.ExceptionIconStyleClassName, WebInspector.UIString("All Uncaught Exceptions"));

This makes me wonder if we should drop "All" here. It looks funny next to "Assertion Failures" that does not have "All".
Comment 7 Joseph Pecoraro 2016-10-17 12:19:51 PDT
(In reply to comment #6)
> Comment on attachment 291570 [details]
> [PATCH] Proposed Fix
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=291570&action=review
> 
> Cool!
> 
> > Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js:110
> >          this._allUncaughtExceptionsBreakpointTreeElement = new WebInspector.BreakpointTreeElement(WebInspector.debuggerManager.allUncaughtExceptionsBreakpoint, WebInspector.DebuggerSidebarPanel.ExceptionIconStyleClassName, WebInspector.UIString("All Uncaught Exceptions"));
> 
> This makes me wonder if we should drop "All" here. It looks funny next to
> "Assertion Failures" that does not have "All".

I agree. I'll rename it "Uncaught Exceptions" when I land.
Comment 8 Joseph Pecoraro 2016-10-17 17:39:24 PDT
<https://trac.webkit.org/changeset/207444>