I am using Firefox (Developer Edition) as my primary debugging environment for web-development. Is there some way to make the Web Console automatically scroll to keep up with new output as it is logged?
I’m using Webpack with HMR and the console quickly fills up with messages and then I have to keep manually scrolling down all the time. This is extremely annoying because it is a lot quicker to move one’s eyes across two monitors than to move the mouse all the way, just to scroll a log.
hello there.
It should automatically scrolled until you scroll up, but maybe we do have bugs?
Would you have a use case where it doesn’t scroll so we can investigate?
Thanks!
As a developer, I did wonder if it had stopped automatically scrolling because I had “detached” it from the tail of the log by scrolling up and so I tried to scroll to the end but that failed to “attach” it, again – hence this post.
Let me do some quick experiments and see if I can work out the bug…
so yes, the heuristic is that if you scrolled up, we’re not going to automatically scroll (because you might want to have a look at a given message, and if we keep jumping you down it will be annoying).
But there has been issues in the past, so maybe there’s a case where we don’t handle that right
WDS is webpack’s development server. It serves webpack content and implements hot-module-replacement, notifying the browser to reload certain modules only (instead of the whole page) when certain code files change.
Reproducing the bug is non-trivial. I tried to do it with a basic webpack app but the console scrolled as expected.
In the end, I had to gut my own project and put together a sample that reproduces the bug. It needs a node.js environment and yarn (or npm). The bug can definitely be reproduced thusly:
Observe that a site with one line of text appears.
Open the developer console. Observe some entries in the console.
Use a text editor to repeatedly touch the file ./src/components/App/App.vue.html (can be done by appending spaces to the end and saving.)
Every time the file is touched, WDS recompiles and the browser should show messages in the console indicating that it was notified that the app updated but that “nothing changed”
Eventually, the console will stop scrolling down. (In my real project, this happens immediately. With the cut-down sample, I found I had to try several times after the log messages exceeded the height of the console window.)
Firefox D.E. 66.0b13 (64-bit); Windows 10; Node.js v10.15.0
I am having this issue with firefox-99-0b6 development edition. Same problem as initially mentioned. When WDS is recompiled, my console behaves just like @andreasvirkus attached recording.
I also experienced this problem with firefox 80 standard/community edition. @Nicolas_Chevobbe
From what I can see, the height of messages matters. If you have a recording to share it could be interesting to see what kind of messages trigger the bug for you.
Just wanted to follow up: Bug https://bugzilla.mozilla.org/show_bug.cgi?id=1760910 is included in Firefox 101 which should very soon be on the release channel. So if anyone still experiences similar issues with Firefox 101 or newer, please add a comment here (or file a bug directly )