[Webkit-unassigned] [Bug 19131] Can't remove a breakpoint

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 12 09:44:16 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=19131





--- Comment #2 from Patrick Mueller <pmuellr at yahoo.com>  2009-08-12 09:44:14 PDT ---
The inability to delete breakpoints continues to bug me.  At one point
recently, one of my source files was just splattered with blue turds as I kept
moving breakpoints around, reloading the file, etc.

Here's a patch to change the enable/disable breakpoint click states to
enable/disable/remove.  ie, as you click on the line number in a source view,
the breakpoint gets added, then disabled, then removed, then added, ...

This seems fairly natural to me.  Another option would be to only add/remove
via the click, and allow enable/disable in the new breakpoints sidebar.  Not
clear whether removing breakpoints from the sidebar is required - I think I'd
argue that if we want to add that, we may well want more function in the
sidebar like "disable all/remove all", etc, and so should look at "remove a
breakpoint from sidebar" as part of a larger design effort for that sidebar.

I'm happy to kosher this up as a patch, if folks agree the current patch is
useful.

Index: WebCore/inspector/front-end/SourceFrame.js
===================================================================
--- WebCore/inspector/front-end/SourceFrame.js    (revision 47011)
+++ WebCore/inspector/front-end/SourceFrame.js    (working copy)
@@ -289,8 +289,10 @@
             return;

         var sourceRow = event.target.enclosingNodeOrSelfWithNodeName("tr");
-        if (sourceRow._breakpointObject)
-            sourceRow._breakpointObject.enabled =
!sourceRow._breakpointObject.enabled;
+        if (sourceRow._breakpointObject &&
sourceRow._breakpointObject.enabled)
+            sourceRow._breakpointObject.enabled = false;
+        else if (sourceRow._breakpointObject) 
+           
WebInspector.panels.scripts.removeBreakpoint(sourceRow._breakpointObject);
         else if (this.addBreakpointDelegate)
            
this.addBreakpointDelegate(this.lineNumberForSourceRow(sourceRow));
     },

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list