The default bug view has changed. See this FAQ.

The debugger refreshes the editor contents on every pause

RESOLVED FIXED in Firefox 13

Status

()

Firefox
Developer Tools: Debugger
P2
normal
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: past, Assigned: past)

Tracking

Trunk
Firefox 13
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

After bug 700639, each time the debugger gets to a paused state the editor contents are refreshed, even though no change has occurred. The reason is that the XUL menulist we are now using needs to generate a change event every time a new script is loaded, which triggers the editor refresh. In the HTML select element case we could add options without triggering it, but I don't think that's possible now.

But even if it were, the problem stems from the fact that when entering a paused state the debugger client sends a "scripts" protocol request to the server to retrieve any scripts the server is aware of. This is currently redundant, since the client also handles "newScript" notifications from the server each time a new script appears. The better fix would arguably be to remove the "scripts" request, as well as the "scriptsadded" and "scriptscleared" handlers from the debugger client.
Blocks: 676586
Priority: -- → P2
The one time when a "scripts" request would be required is when opening the debugger UI. The debugger server may have already received a list of scripts in the page before the debugger UI was ready to handle such notifications, so it would be necessary to query once.
Blocks: 687093
Created attachment 592710 [details] [diff] [review]
Working patch

Simple fix. I didn't include a test, because it looks complicated to write a proper one and it doesn't seem to make much sense for a one-liner, to be honest.
Assignee: nobody → past
Status: NEW → ASSIGNED
Attachment #592710 - Flags: review?(dcamp)

Updated

5 years ago
Attachment #592710 - Flags: review?(dcamp) → review+
Whiteboard: [land-in-fx-team]
https://hg.mozilla.org/integration/fx-team/rev/ac4190a91b2f
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/ac4190a91b2f
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 13
You need to log in before you can comment on or make changes to this bug.