[Webkit-unassigned] [Bug 52879] Web Inspector: refactor debugger api

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 21 05:31:42 PST 2011


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





--- Comment #2 from Pavel Podivilov <podivilov at chromium.org>  2011-01-21 05:31:42 PST ---
(In reply to comment #1)
> (In reply to comment #0)
> > The are two problems with setting breakpoints using our API:
> > 1. Clients have to manage the list of sticky breakpoints and constantly call setStickyBreakpoints to sync that list with backend.
> > 2. There is no way to set JavaScript breakpoint by url.
> > 
> > 
> > To fix the first problem, we should update sticky breakpoints on backend each time client calls set/remove breakpoint method.
> > Since we have two independent debugger agents (InspectorDebuggerAgent and InspectorBrowserDebuggerAgent), sticky breakpoints management should be implemented in both.
> > 
> > Client should have to sync all breakpoints just once at the beginning using the following methods:
> > [domain=Inspector] setAllJavaScriptBreakpoints(breakpoints)
> > [domain=Inspector] setAllBrowserBreakpoints(breakpoints)
> 
> if it is an inspector domain method then you can have single method and just skip the breakpoints which can't be set for some reason.
> Also there is should be a notification or method about breakpoints statuses.
> 

I think we should better change the domain here:
[domain=Debugger] setAllJavaScriptBreakpoints(breakpoints)
[domain=BrowserDebugger] setAllBrowserBreakpoints(breakpoints)

> 
> > To fix the second problem, JavaScript debugger API should allow setting breakpoint by both url and sourceID.
> > [domain=Debugger] setJavaScriptBreakpoint(url, lineNumber, condition, enabled, out breakpointId)
> > [domain=Debugger] setJavaScriptBreakpointBySourceID(sourceID, lineNumber, condition, enabled, out breakpointId)
> 
> It should be not an id but a structure with breakpoint info enough for persisting on front-end side.
> 

Here input parameters are enough to persist breakpoint on front-end side, so returning breakpointId should be ok.

> > [domain=Debugger] removeJavaScriptBreakpoint(breakpointId)
> 
> ditto

-- 
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