Bug 47085 - Web Inspector: set XHR breakpoint from resource panel
Summary: Web Inspector: set XHR breakpoint from resource panel
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-04 07:15 PDT by Pavel Podivilov
Modified: 2018-06-20 16:48 PDT (History)
11 users (show)

See Also:


Attachments
Patch. (2.72 KB, patch)
2010-10-04 07:17 PDT, Pavel Podivilov
no flags Details | Formatted Diff | Diff
Patch. (2.74 KB, patch)
2010-10-05 08:20 PDT, Pavel Podivilov
yurys: review+
podivilov: commit-queue?
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Podivilov 2010-10-04 07:15:35 PDT
Web Inspector: set XHR breakpoint from resource panel

Add "Set Breakpoint" item to XHR resource context menu.
Comment 1 Pavel Podivilov 2010-10-04 07:17:06 PDT
Created attachment 69631 [details]
Patch.
Comment 2 Alexander Pavlov (apavlov) 2010-10-04 07:27:23 PDT
Comment on attachment 69631 [details]
Patch.

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

> WebCore/inspector/front-end/ResourcesPanel.js:1255
> +        var resource = null;

Seems like there's no need to initialize this explicitly

> WebCore/inspector/front-end/ResourcesPanel.js:1268
> +        if (resource && resource.category.name === "xhr") {

(... && resource.category === WebInspector.resourceCategories.xhr)
looks cleaner
Comment 3 Pavel Podivilov 2010-10-05 08:20:34 PDT
Created attachment 69787 [details]
Patch.

Comments addressed.
Comment 4 Yury Semikhatsky 2010-10-05 08:37:31 PDT
Comment on attachment 69787 [details]
Patch.

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

> WebCore/inspector/front-end/ResourcesPanel.js:1271
> +            contextMenu.appendItem(WebInspector.UIString("Set Breakpoint"), WebInspector.breakpointManager.createXHRBreakpoint.bind(WebInspector.breakpointManager, resource.url));

We may want to be more specific about the nature of the breakpoint to set.
Comment 5 Pavel Podivilov 2010-10-06 01:18:28 PDT
Committed r69180: <http://trac.webkit.org/changeset/69180>
Comment 6 Pavel Podivilov 2010-10-06 01:27:06 PDT
(In reply to comment #4)
> (From update of attachment 69787 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=69787&action=review
> 
> > WebCore/inspector/front-end/ResourcesPanel.js:1271
> > +            contextMenu.appendItem(WebInspector.UIString("Set Breakpoint"), WebInspector.breakpointManager.createXHRBreakpoint.bind(WebInspector.breakpointManager, resource.url));
> 
> We may want to be more specific about the nature of the breakpoint to set.

I've accidentally committed it with "Set Breakpoint". Let me fix the wording in a separate patch.