Multiple windows share one console panel?

97 views
Skip to first unread message

Jonas Smithson

unread,
Mar 14, 2014, 9:53:23 PM3/14/14
to fir...@googlegroups.com
I have the same page from my development server loaded into several Firefox windows simultaneously, because each window is a different size and I'm working on JavaScript that responds to different viewport sizes. (I find this arrangement more convenient than constantly resizing a single window, especially because I have each window set to a very specific size.)

I also have one Firebug console open (separate, not pinned to any window). It seems that only one of my Firefox windows "owns" that console panel -- if I want to see console.log alerts from other windows, I have to open a separate Firebug console for each window.

Although I'm using two monitors, I'm out of room. In this situation, I think the most convenient thing might be for the multiple Firefox windows to "share" a single Firebug console panel -- that is, when I reload any Firefox window, it would "take over" the one Firebug console no matter which window owned it before, blank out whatever was in it, and write to it.

Is this possible?  Thanks.

Sebastian Zartner

unread,
Mar 16, 2014, 10:55:45 AM3/16/14
to fir...@googlegroups.com
I suggest instead of having multiple windows opened you should use the Responsive Design View available in the Firefox menu under Web Developer. This tool allows you to easily switch between different client sizes without having to resize the window manually. With that you can test different viewport dimensions on a single tab or multiple tabs.
And then it's also possible to use the same Firebug window for the different resolutions.

Sebastian

Jonas Smithson

unread,
Mar 17, 2014, 12:34:27 AM3/17/14
to fir...@googlegroups.com
Thanks for the suggestion. I've just started experimenting with Responsive Design View. I discovered very quickly two problems I'm having with it, although perhaps it's just my lack of familiarity with it.

The main problem is that some of my responsive design scripts, which normally (according to Firebug) fire only once when the page loads, have instead been firing twice when in Responsive Design View. (They all fire in the correct sequence, then they all fire again.) I can only guess why: I've been writing some very complex responsive scripts, and some of them respond not only to viewport size, but also to a user resizing the viewport after the page loads. This doesn't actually trigger a page reload, but does run the main responsive scripts again. (That would presumably be a desktop user, although a mobile user rotating their device might be similar.) Perhaps, even though I'm not switching to a different RDV preset after the page loads, there's a kind of implicit "page resize" that Firefox/RDV does behind the scenes during every page load, and that's triggering my "page resized" events?

That double-firing of the scripts would only be slightly annoying, but in addition, when I'm in RDV the Firebug console acts as though I had pressed "Persist" even though I haven't. In other words, my numerous console.logs, in addition to marching down the console -- twice -- continue to aggregate and quickly march down out of view in the console. I have to click and scroll the console (or click and clear it) to see them all every time I change the viewport size simulation... the console doesn't clear itself until I reload the page.

I'll continue to play with it a little more and see if there's any way around these issues... but RDV seems very simple. Are there options (for example, to clear the console automatically) that I'm not aware of?

I'd still like to be able to "share" one Firebug console with multiple windows. As far as I can tell, the other browser consoles (IE, Chrome, etc.) don't let me do this either.


--
You received this message because you are subscribed to the Google Groups "Firebug" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebug+u...@googlegroups.com.
To post to this group, send email to fir...@googlegroups.com.
Visit this group at http://groups.google.com/group/firebug.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebug/b0636f16-e9fa-4aca-8cb9-257e9319c447%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sebastian Zartner

unread,
Mar 17, 2014, 3:50:53 AM3/17/14
to fir...@googlegroups.com
Perhaps, even though I'm not switching to a different RDV preset after the page loads, there's a kind of implicit "page resize" that Firefox/RDV does behind the scenes during every page load, and that's triggering my "page resized" events?
When changing the dimensions within RDV the resize event is triggered multiple times like when resizing the browser window. You can log these events to the console by executing monitorEvents(window, "resize") within the Command Line.

That double-firing of the scripts would only be slightly annoying, but in addition, when I'm in RDV the Firebug console acts as though I had pressed "Persist" even though I haven't. In other words, my numerous console.logs, in addition to marching down the console -- twice -- continue to aggregate and quickly march down out of view in the console. I have to click and scroll the console (or click and clear it) to see them all every time I change the viewport size simulation... the console doesn't clear itself until I reload the page.

I'll continue to play with it a little more and see if there's any way around these issues... but RDV seems very simple. Are there options (for example, to clear the console automatically) that I'm not aware of?
The console is only automatically cleared when reloading the page. Though you can use console.clear() in your code to clear it manually.

I'd still like to be able to "share" one Firebug console with multiple windows. As far as I can tell, the other browser consoles (IE, Chrome, etc.) don't let me do this either.
This behavior was mentioned by me some time ago in issue 2308. You may want to report this as separate enhancement request, though, since that issue actually covers the opposite of what you want.

Sebastian

Jonas Smithson

unread,
Mar 17, 2014, 2:51:28 PM3/17/14
to fir...@googlegroups.com
When changing the dimensions within RDV the resize event is triggered multiple times like when resizing the browser window.

Yes, that's what I'd expect. But as I said, I haven't changed dimensions within the RDV -- simply loading the page in the first place, when FF was previously put into RDV mode, causes my entire sequence of responsive JavaScripts (which include viewport-size detection, etc.) to fire twice. By contrast, when FF is in normal mode, the same scripts on the same page fire only once, as they're meant to.

That's why I wonder if RDV is doing some kind of "resize" thing behind the scenes every time a page loads, even if the user doesn't touch the popdown/presets menu. In any event it makes RDV slightly less useful to me at the moment.

Sebastian Zartner

unread,
Mar 17, 2014, 7:02:05 PM3/17/14
to fir...@googlegroups.com
When changing the dimensions within RDV the resize event is triggered multiple times like when resizing the browser window.

Yes, that's what I'd expect. But as I said, I haven't changed dimensions within the RDV -- simply loading the page in the first place, when FF was previously put into RDV mode, causes my entire sequence of responsive JavaScripts (which include viewport-size detection, etc.) to fire twice. By contrast, when FF is in normal mode, the same scripts on the same page fire only once, as they're meant to.

That's why I wonder if RDV is doing some kind of "resize" thing behind the scenes every time a page loads, even if the user doesn't touch the popdown/presets menu. In any event it makes RDV slightly less useful to me at the moment.

You're right. I can reproduce this on my machine. So I filed bug 984656 at Mozilla.

Sebastian
Reply all
Reply to author
Forward
0 new messages