How can I stop the LogCat output from scrolling au

2020-05-19 06:15发布

UPDATE: This turned out to be a bug in R14 of the SDK tools. It has been fixed in R15 which was released on Oct/27/2013. Updating to the latest release solves the problem as suggested in the accepted answer.

I use the LogCat window in the Debug view in Eclipse to diagnose and fix crashes in my code. I've noticed that the LogCat output will automatically scroll down anytime new lines are added (but only after you scroll to the bottom yourself).

This is great if I'm waiting for an exception stacktrace to come up, but extremely annoying if I'm trying to read something in the log and more lines are continuing to be added at the bottom (it keeps jumping to the bottom, so I scroll back to the error, then it jumps to the bottom again).

Is there any way to make it stay where I've placed it, when I place it, but continue to scroll automatically when I reach the bottom?

EDIT: Please note, I'm aware of filters and I don't consider this a solution to the problem.

ANOTHER EDIT: If I scroll up "far enough" from the bottom, it stops scrolling automatically. Far enough might be 5 lines or it might be 500 lines, it seems to be related to how many lines are in the log. Ideally, it would stop scrolling as long as I was at least 1 line away from the bottom.

9条回答
爱情/是我丢掉的垃圾
2楼-- · 2020-05-19 06:46
Window => Preferences => Android => Logcat

Uncheck the box called:

Display logcat view when there are messages from 
an application into the workspace
查看更多
姐就是有狂的资本
3楼-- · 2020-05-19 06:47

That's not what happens to me. If I scroll up it won't scroll down automatically when new lines come to the logcat until I scroll it to the bottom. Maybe it's because of the Eclipse or the Android SDK version. I'm using the latest right now.

查看更多
Ridiculous、
4楼-- · 2020-05-19 06:51

If you're only debugging crashes, click on the red (E) (error) filter for your main logcat, and keep your filter tab set to default to view all lines that are being reported by your application.

What ends up happening, when your application crashes it stays closed unless requested to restart by your choosing. So, the last lines in the logcat will be the crash report. This is one of the ways of how I debug crashes.

查看更多
一夜七次
5楼-- · 2020-05-19 06:59

update to the latest version. the new logcat automatically filters your logs into the app-specific crash logs when you build-launch your app via eclipse.

查看更多
可以哭但决不认输i
6楼-- · 2020-05-19 07:01

You can do adb logcat in a shell, and use your terminal app's scroll buffer and scrolling features to manage the logcat output.

查看更多
Summer. ? 凉城
7楼-- · 2020-05-19 07:03

I stopped having problems disable the option: Automatically enable / disable scroll lock based on the scrollbar position.

Window> Preferences> Android> Logcat> uncheck the option above.

In my case, I'm using Eclipse + Android Developer Tools (Build: v22.6.2-1085508)

I suggest that if I want to use eclipse, download the full package from this link: http://developer.android.com/sdk/index.html

After downloading, download all available updates, less NDK.

查看更多
登录 后发表回答