Auto-scrolling Chrome's DevTools console

痞子三分冷 提交于 2019-11-27 21:06:39

问题


Since its inception few years back, Chrome has become a de-facto IDE for web development. I've been using it's Canary(Version 28.0.1464.0) channel for quite a bit and been happy as a clam. Only issue that keeps bothering me is the lack of ability to have the DevTools console pane, auto scroll to the last message added. I understand that many folks would prefer to have the current behavior. However I was wondering: Does anyone knows how (if even possible with the current release) to flip the switch and have the console auto-scroll?

Thanks.


回答1:


Clearing the console and scrolling the bar down to the bottom didn't work for me.

The problem was that I had zoomed out DevTools.

If I hit Ctrl-0 (zero) on Windows, or Cmd-0 (zero) on OS X, on DevTools to restore the default font-size, then auto-scroll to bottom worked as expected.

Thanks to this guy for pointing it out: http://code.google.com/p/chromium/issues/detail?id=161646#c5




回答2:


One Reason why it's happening:

Logging of HTML elements into the console makes the console view lose the last console message.

How to solve it:

Instead of doing something like this:

console.log("Some logging message:", html_element)

try this (wrapped the messages with brackets)

console.log(["Some logging message:", html_element])




回答3:


In Chrome version 29.0.1547.76 m, it auto-scrolls when you undock the console. It stops auto-scrolling if you click on the console, then you'll have to clear the console before auto-scroll will be ready to start again.

The "Undock into separate window." button is the bottom-left most button of the console.




回答4:


It drove me crazy too and I found the solution here:

Google Chrome follow developer console logging

With the console open, drag the scroll bar down to the bottom of the window and release it. It should tail the output for you.

It does not matter if you have the console docked or not.

Working for me on a osx 10.8.5 and chrome 31




回答5:


For me I've noticed that the autoscroll stopped when the console showed a warning so I've filtered out the warnings and all is good:




回答6:


For me the only solution that worked was:

  1. click F1 (settings)
  2. At the bottom restore defaults and reload.

None of the above worked.




回答7:


I found this solution in Chrome 49+

Go Dev-tools/ Settings /

"Console tab"

x Preserve log upon navigation.

Done!



来源:https://stackoverflow.com/questions/15832519/auto-scrolling-chromes-devtools-console

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!