Closed Bug 963215 Opened 11 years ago Closed 6 years ago

Should not refresh entire variables view when adding or updating watch expressions

Categories

(DevTools :: Debugger, defect, P3)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: rcampbell, Unassigned, Mentored)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [lang=js])

If I'm looking at an object in a variables view, I might have multiple properties expanded and scrolled. Adding a watch expression collapses all of the expanded properties and loses my scroll position.
When adding or updating watch expressions, the entire view is refreshed which has the effect of making it look like everything is collapsed. It would be good to (ideally) only have it affect either the specific watch expression, or failing that only update the watch expressions. Part of the problem is that a watch expression can execute arbitrary code, which can affect what's displayed elsewhere in the view. Say your watch expression was `x = 10`. Adding that watch expression mutates the global scope and so the display global scope would be out of date until updated. Another possibility is to continue updating as we do now, but then reexpand things that were expanded.
Summary: adding watch expression collapses variables view → adding or updating watch expressions refre
Summary: adding or updating watch expressions refre → adding or updating watch expressions refreshes the entire variables view, causing expanded nodes to appear to collapse
(In reply to Brandon Benvie [:benvie] from comment #1) > Another possibility is to continue updating as we do now, but then reexpand > things that were expanded. This should be possible by adding a VariablesView.commitHierarchy() call in the appropriate place.
(In reply to Panos Astithas [:past] from comment #2) > (In reply to Brandon Benvie [:benvie] from comment #1) > > Another possibility is to continue updating as we do now, but then reexpand > > things that were expanded. > > This should be possible by adding a VariablesView.commitHierarchy() call in > the appropriate place. ...which should be done automatically now. However, not all scopes are re-expanded, for performance reasons ("stepping feels slow"): http://dxr.mozilla.org/mozilla-central/source/browser/devtools/shared/widgets/VariablesView.jsm#2933 I think we should bypass that when adding watch expressions.
Priority: -- → P3
Victor/Benvie, could this be a good mentored bug (not necessarily good-first bug)?
Flags: needinfo?(vporof)
Flags: needinfo?(bbenvie)
(In reply to Nick Fitzgerald [:fitzgen] [Ðoge:D6jomNp59N9TVfgc538HU3RswwmwZwcrd7] from comment #4) > Victor/Benvie, could this be a good mentored bug (not necessarily good-first > bug)? I see no harm in that.
Flags: needinfo?(vporof)
Agree, doing what Victor said in comment 3 should be mentorable.
Flags: needinfo?(bbenvie)
Whiteboard: [mentor=vporof@mozilla.com][mentor=bbenvie@mozilla.com][lang=js]
Mentor: vporof bbenvie
Mentor: bbenvie, vporof
Whiteboard: [mentor=vporof@mozilla.com][mentor=bbenvie@mozilla.com][lang=js] → [lang=js]
Mentor: bbenvie, vporof
Mentor: bbenvie
Summary: adding or updating watch expressions refreshes the entire variables view, causing expanded nodes to appear to collapse → Should not refreseh entire variables view when adding or updating watch expressions
Summary: Should not refreseh entire variables view when adding or updating watch expressions → Should not refresh entire variables view when adding or updating watch expressions
Product: Firefox → DevTools

Can I work on this bug ?

Flags: needinfo?(vporof)

I think a better person to ask here is Jason.

Flags: needinfo?(vporof) → needinfo?(jlaster)

Hey dhyey, I think this bug refers to the old debugger and is no longer relevant.

Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(jlaster)
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.