Summary: | Web Inspector: [Chromium] breakpoints are not preserved after reload | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andrey Kosyakov <caseq> | ||||||||
Component: | Web Inspector (Deprecated) | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Minor | CC: | bweinstein, joepeck, keishi, pfeldman, pmuellr, rik, timothy, yurys | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Attachments: |
|
Description
Andrey Kosyakov
2010-04-26 11:22:49 PDT
Created attachment 54321 [details]
Restore breakpoints associated with script's url once script is parsed
Comment on attachment 54321 [details]
Restore breakpoints associated with script's url once script is parsed
WebCore/inspector/front-end/Breakpoint.js:74
+ return (this.url ? this.url : this.sourceID) + ":" + this.line;
It is not clear to me why this change is necessary. We'd like breakpoints to point to exact scripts, while URL <-> sourceID mapping is external.
WebKit/chromium/src/js/DebuggerAgent.js:1100
+ if (line * 1 == line)
if (parseInt(line) === line)
WebKit/chromium/src/js/DebuggerAgent.js:1101
+ WebInspector.restoredBreakpoint(sourceID, scriptUrl, devtools.DebuggerAgent.v8ToWwebkitLineNumber_(line * 1), true, breakpoints[line].condition());
line * 1 -> parseInt(line)
I think you should call devtools.DebuggerAgent.prototype.addBreakpoint for disabled breakpoints as well and populate the maps with the appropriate BreakpointInfo. You would need to cut the control flow further so that disabled breakpoint does not get into the VM.
Created attachment 54405 [details]
added support for "enabled" state when storing breakpoints
Comment on attachment 54405 [details]
added support for "enabled" state when storing breakpoints
Looks good except for bogus console.log.
Comment on attachment 54405 [details]
added support for "enabled" state when storing breakpoints
Looks good except for bogus console.log.
Created attachment 54406 [details]
removed console.log
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebKit/chromium/ChangeLog M WebKit/chromium/src/js/DebuggerAgent.js Committed r58312 |