WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
60762
Web Inspector: [protocol] extend setBreakpointByUrl request to accept incomplete URL (predicates)
https://bugs.webkit.org/show_bug.cgi?id=60762
Summary
Web Inspector: [protocol] extend setBreakpointByUrl request to accept incompl...
Peter Rybin
Reported
2011-05-13 06:38:07 PDT
Use case: "provisional breakpoints" In IDE user opens source file foo.js from disk. He sets a breakpoint in the file. Then he attaches to Chrome. At this moment Chrome must learn about the user breakpoints, but exact URL or script id is needed. If script hasn't been loaded yet the breakpoint cannot be set without knowing exact URL. This makes it extremely hard to build an IDE with provisional breakpoints, event harder is to build user-friendly IDE. Scenario that is to be implemented: IDE from a short name of the file foo.js (and possibly some additional mark-up) specifies a URL predicated, either in form of a URL substring, RegExp or path component list (the latter is nice because the reverse map URL -> matching breakpoints can be built). When Chrome compiles a new script, it checks predicates of all provisional breakpoints and set matching ones in the new script. I propose this feature first implemented and added to protocol in experimental mode because the optimal type of predicate seems unclear now.
Attachments
Patch
(10.72 KB, patch)
2011-07-21 05:07 PDT
,
Pavel Feldman
yurys
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Peter Rybin
Comment 1
2011-07-18 13:58:03 PDT
This probably should reproduce V8's debug protocol feature: RegExp on the script name. You can set a breakpoint specifying a RegExp pattern for the script name (in place of script URL or source ID). Unlimited number of scripts could be matched.
Pavel Feldman
Comment 2
2011-07-21 05:07:58 PDT
Created
attachment 101576
[details]
Patch
WebKit Review Bot
Comment 3
2011-07-21 05:10:20 PDT
Attachment 101576
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/insp..." exit_code: 1 Source/WebCore/inspector/InspectorDebuggerAgent.cpp:184: The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] Source/WebCore/inspector/InspectorDebuggerAgent.h:85: The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] Total errors found: 2 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yury Semikhatsky
Comment 4
2011-07-21 05:16:09 PDT
Comment on
attachment 101576
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=101576&action=review
> LayoutTests/inspector/debugger/debugger-set-breakpoint-regex.html:45 > +Tests Debugger.setBreakpointByUrl with isRegex set to true.
Link to the bug is missing.
Pavel Feldman
Comment 5
2011-07-21 05:20:13 PDT
Committed
r91461
: <
http://trac.webkit.org/changeset/91461
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug