Closed Bug 799070 Opened 12 years ago Closed 5 years ago

Breakpoints set on a script that is not yet present in the server should move to their actual location asap

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: past, Unassigned)

References

(Blocks 1 open bug)

Details

After bug 737803, setting a breakpoint in a line without executable code will move the icon to the proper line. Sometimes however the debugger server isn't aware of any scripts containing that line, because that script was executed and scavenged before the debugger was started. In such cases reloading the page will allow the server to observe the appearance of such a script and set the breakpoint.

Since the protocol does not support sending back the actual location of the breakpoint at that time, the debugger frontend will have to deduce the updated location by examining the |paused| packet. Indeed, when a breakpoint is hit, the reason for the pause will be present in the |why| property. If why.type == "breakpoint", then |where.line| will contain the updated location of the breakpoint with the ID in the list |why.actors|.

A useful visual cue for the user might be to display such breakpoints originally in gray, and only set the normal color when the above inference takes place.
STR:
1) Open http://htmlpad.org/debugger
2) Set a breakpoint at line 32
3) The server returns error:"noScript" because the outer script is long gone, but still creates a breakpoint (conn0.breakpoint13 in my case) which the frontend displays normally
4) Reload the page
5) The debugger pauses on line 33 and the paused packet contains:
packet.frame.where: {
  url:"http://htmlpad.org/debugger/",
  line:33
},
packet.why: {
  type:"breakpoint",
  actors:["conn0.breakpoint13"]
}
Priority: -- → P3
Summary: When a breakpoint is set on a script not yet present in the server, it should be updated as soon as it is found → Breakpoints set on a script that is not yet present in the server should move to their actual location asap
Product: Firefox → DevTools

The new debugger does not let users set a breakpoint at an invalid location (line). If the source has been GCd they should refresh because when the debugger is opened scripts are no longer GCd

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
Blocks: 1565711
Blocks: 1565713
No longer blocks: 1565711
No longer blocks: 1565713
You need to log in before you can comment on or make changes to this bug.