Bug 38132 - Web Inspector: [Chromium] breakpoints are not preserved after reload
Summary: Web Inspector: [Chromium] breakpoints are not preserved after reload
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Minor
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-26 11:22 PDT by Andrey Kosyakov
Modified: 2010-04-27 09:59 PDT (History)
8 users (show)

See Also:


Attachments
Restore breakpoints associated with script's url once script is parsed (5.48 KB, patch)
2010-04-26 12:04 PDT, Andrey Kosyakov
pfeldman: review-
Details | Formatted Diff | Diff
added support for "enabled" state when storing breakpoints (5.49 KB, patch)
2010-04-27 03:13 PDT, Andrey Kosyakov
no flags Details | Formatted Diff | Diff
removed console.log (5.36 KB, patch)
2010-04-27 03:23 PDT, Andrey Kosyakov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Kosyakov 2010-04-26 11:22:49 PDT
1. Load a page
2. Set a breakpoint
3. Reload

EXPECTED: Breakpoint is displayed in Breakpoints sidebar pane
ACTUAL: Breakpoint is hit, but it's not displayed in Breakpoints sidebar pane
Comment 1 Andrey Kosyakov 2010-04-26 12:04:24 PDT
Created attachment 54321 [details]
Restore breakpoints associated with script's url once script is parsed
Comment 2 Pavel Feldman 2010-04-26 13:17:06 PDT
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.
Comment 3 Andrey Kosyakov 2010-04-27 03:13:32 PDT
Created attachment 54405 [details]
added support for "enabled" state when storing breakpoints
Comment 4 Pavel Feldman 2010-04-27 03:18:03 PDT
Comment on attachment 54405 [details]
added support for "enabled" state when storing breakpoints

Looks good except for bogus console.log.
Comment 5 Pavel Feldman 2010-04-27 03:21:03 PDT
Comment on attachment 54405 [details]
added support for "enabled" state when storing breakpoints

Looks good except for bogus console.log.
Comment 6 Andrey Kosyakov 2010-04-27 03:23:43 PDT
Created attachment 54406 [details]
removed console.log
Comment 7 Pavel Feldman 2010-04-27 09:39:33 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebKit/chromium/ChangeLog
	M	WebKit/chromium/src/js/DebuggerAgent.js
Committed r58312