Watch Panel questions

14 views
Skip to first unread message

San

unread,
Aug 11, 2014, 5:56:44 PM8/11/14
to fir...@googlegroups.com
Although I've been using the debugger for a while, in the past I've always revealed the values of variables just by hovering over them in the left panel. Now I'm trying to use the Watch Panel as well. I read a little documentation about it, and can see how it might be quite useful, but so far I'm finding it awkward. (I'm still back on Firebug 1.12.8, if that's relevant here.)

One limitation is that the Watches only auto-update if I'm using breakpoints (line-clicking through the debugger). However, I'd like them to update even if I'm not using breakpoints -- for example, when the page first loads, and also when the user clicks on anything. Right now those events don't affect the Watches: their values remain empty (after initial page load) or outdated (not showing that a click event has actually changed the value). I have to keep manually clicking "Refresh" from the drop-down menu, or keep right-clicking a Watch, in order for them to show a current value. That's slowing me down a lot, since there's a lot of clicking going on. Is there any way to get the Watches to auto-update in response to any page event, or (if that's not possible) even just every x seconds, so I don't have to keep choosing Refresh?

Another issue is that some Watches never show a value, even though other similar variables do. For example, I created a Watch for elms.illus.style.marginTop that shows a correct value (if I click Refresh), but a similar Watch right next to it, for an element more deeply nested on the same page -- elms.illusSubcaption.style.height -- will never show a value in the Watch panel, even if I Refresh. By contrast, that same property does show a current value if I hover over it in the left Script panel while using breakpoints. What's the likely reason for the Watches to be picky like that? Something to do with scope, perhaps?

Any help with this would be appreciated, because the Watches do seem like a great idea, if I could make them work more efficiently.

Sebastian Zartner

unread,
Aug 12, 2014, 7:45:34 AM8/12/14
to fir...@googlegroups.com
We currently cannot recognize whether a variable has changed. Therefore we need browser support. See issue 4873.
Firebug 2.0 mitigates this a bit as the Watch side panel gets at least updated when something is executed within the Command Line.
Updating every x seconds might be a temporary solution, though would constantly cost CPU and memory resources to update the display (even when nothing has changed), which we want to avoid. Another side effect would be that updating the panel while you're typing a new watch expression would currently interrupt the editing.

Sebastian
Reply all
Reply to author
Forward
0 new messages