Closed
Bug 754251
Opened 13 years ago
Closed 13 years ago
Can't set breakpoint in Script Debugger
Categories
(DevTools :: Debugger, defect, P2)
Tracking
(firefox15 fixed)
RESOLVED
FIXED
Firefox 16
| Tracking | Status | |
|---|---|---|
| firefox15 | --- | fixed |
People
(Reporter: harth, Assigned: past)
References
Details
Attachments
(1 file, 1 obsolete file)
|
4.49 KB,
patch
|
rcampbell
:
review+
lsblakk
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
STR:
1) visit http://harthur.github.com/wwcode/
2) open Web Developer > Script Debugger
3) select "wwcode.js" to debug
4) try to set a breakpoint at line 35 by clicking to the left of the line number
Expected:
Dot appears to left of line number and breakpoint set
Actual:
No dot and no breakpoint set.
| Assignee | ||
Comment 1•13 years ago
|
||
This will be fixed by bug 737808.
The problem is that when you first open the debugger, the script that corresponds to that piece of code is already GC'd. When you reload the page, we attach early and get a chance to get to the script. With the fix in that bug, the debugger frontend will allow you to set a breakpoint there, even though the debuggee won't stop until the page is reloaded.
Depends on: 737808
Priority: -- → P2
| Assignee | ||
Updated•13 years ago
|
Assignee: nobody → past
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•13 years ago
|
||
This patch fixes almost all problems for me, but I need to keep working on it a bit more.
| Assignee | ||
Comment 3•13 years ago
|
||
So this patch fixes the test case, modulo one annoying issue: setting the breakpoint at line 35, makes it slide to line 36 after a reload (not visually, due to bug 737803). If however we reload the page once more, it slides again to line 37. From what I can see after instrumenting the code, SpiderMonkey no longer sees any bytecode in line 36 and the debugger server correctly slides the breakpoint forward. I don't know whether this is a normal optimization for forEach or not. jorendorff may be able to shed some light on this.
The patch fixes a couple of issues with the current code:
(a) updating the cached breakpoint when skipping forward
(b) iterating backwards over the breakpoint cache when setting breakpoints, in order to avoid messing with any cache updating due to (a)
I tried to write a test for breakpoints on startup, but apparently I can't get to the debuggee early enough on reload *for scripts served locally* to set the breakpoint (the script is already GC'd). I wonder if reinstating the workaround from bug 697040 would help with such a test.
Attachment #631044 -
Attachment is obsolete: true
Attachment #631404 -
Flags: review?(rcampbell)
| Assignee | ||
Comment 4•13 years ago
|
||
Jason, see if the SpiderMonkey issue I mention in comment 3 makes any sense to you.
Updated•13 years ago
|
tracking-firefox15:
--- → ?
Comment 5•13 years ago
|
||
Comment on attachment 631404 [details] [diff] [review]
Patch v2
ok
Attachment #631404 -
Flags: review?(rcampbell) → review+
Updated•13 years ago
|
Whiteboard: [land-in-fx-team]
| Assignee | ||
Comment 6•13 years ago
|
||
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
Comment 7•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 16
| Assignee | ||
Comment 8•13 years ago
|
||
Comment on attachment 631404 [details] [diff] [review]
Patch v2
[Approval Request Comment]
Bug caused by (feature/regressing bug #): new feature
User impact if declined: breakpoints will not work in some cases in the debugger
Testing completed (on m-c, etc.): on m-c
Risk to taking this patch (and alternatives if risky): I suppose in theory breakpoint handling could become more buggy, but this claim is unfounded
String or UUID changes made by this patch: none
Attachment #631404 -
Flags: approval-mozilla-aurora?
Comment 9•13 years ago
|
||
Comment on attachment 631404 [details] [diff] [review]
Patch v2
[Triage Comment]
Approving, there will be lots of time to watch this for any potential fallout.
Attachment #631404 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Updated•13 years ago
|
status-firefox15:
--- → affected
| Assignee | ||
Comment 10•13 years ago
|
||
tracking-firefox15:
+ → ---
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•