How to disable the autoscroll feature in Logcat? - android

I use LogCat to look at the debug output of my apps.
If other apps are running or the system has of the test device has some noisy background threads running LogCat will scroll all the time and I have to correct my position manually to read long stack traces.
Is there a way to disable the scrolling in LogCat? Or somehow tweak the scrolling settings?

One way is to create a filter for all the noisy services.
Just create a filter with the tag of the disturbing logs. Logcat will not filter those messages out of the main logview and slow down the scrolling.
This is not the best solution. It will lead to a LogCat with 15 or 20 different filters only used to remove not used log output.
UPDATE Additionally to using filters one of the last updates of the android tools added a pause button to logcat. Just click the button and autoscroll is disabled.

In Logcat at top right there is a button that looks like an arrow pointing downward with line under it. Toggle it to switch autoscrolling on and off.

The question may be a couple of years old, but since it pops up first in Google, I'll just drop this here.
In Eclipse, go to Window, Preferences. Under Android, there is a category LogCat. In this category, there is an option Automatically enable/disable scroll lock based on the scrollbar position.
Untick this to disable the automatic scrolling.

I found a quick fix. In the Logcat, slide the scroller to the top. When autoscroll is need slide to the bottom. You can also use arrow keys.

I agree with uh… your own answer. You don't give any details on the environment so I'm maybe off-topic but here my experience under GNU/Linux (without using Eclipse at all):
First, I always define an application-wide tag as a project constant and use that tag for filtering with a scripts/log simple bash script (checked in Version Control Systems) as follow
#!/bin/bash
adb logcat LoaderManager:V MyApplicationTag:V MyExternalButInvolvedProvider:V SomeDepLibProjectTag:V *:E | ./scripts/coloredlogcat
Using *:E, I catch all the errors and fine-tune the verbosity level for the relevant tags.
I use that with an reasonable terminal history size and the excellent coloredlogcat python script. Using the terminal, just moving to the focused lines stop the automatic scrolling without stopping the logging… I have just to move to the latest lines or press some key to get the automatic scrolling again.

Related

Visual Studio how to disable VS Output Window's auto scrolling to bottom during Android/Xamarin debug run?

I am losing my mind ...wondering how could the following behaviour be the shipped default user experience in Visual Studio where all technologies involved are Microsoft-made:
use microsoft visual studio (2019)
use microsoft Xamarin.Forms to make an app
run the app in debug mode to see updates in the VS Output window
every new line that comes in through logcat from my phone to VS, force auto-scrolls Visual Studio's builtin Output window to the bottom and there's no way to stop it?!
I have to either: 1. stop running the app and read the output. Or 2. futilely wrestle with the damn scrollbar and fight Visual Studio to try to maintain the output window's scroll on a specific position enough moments to read anything.
How did this get past any internal QA for Xamarin? Did they ever try to, you know, make an app? Am I blind? Is there an easy way to stop auto scrolling? Why isn't it enabled by default? The default behavior should be: if the scrollbar is all the way to the bottom, then auto-scroll, sure. But if the scrollbar has been moved by the user, then stop auto-scrolling for the love of god! (this is common sense in many other software)
Also, there's no button on the Output window that locks the scrolling.
This is a hack not a solution, but it works:
Just Ctrl+F anything in the Output window. As long as and while this is active / has found something, the auto-scrolling will be locked/stopped. (and you can still use the scrollbar manually)
So the functionality IS already in VS. Just MS didn't bother to add a scroll lock button for it, or have a manual scrolling override. Microsoft has this lovely track record of insistently not using their own products in a way that actual human beings (read: not imaginary simple target personas) will definitely need to use them.
Release a Microsoft dev environment that can't have a pausable (readable) Output window? Microsoft: Sure, why not? We don't see the problem here. Why would you ever want to read the output of your application? What an edge case!
Try placing the caret (in the Output window) somewhere other than at the bottom.
If I click somewhere in the output other than at the very end, Visual Studio will stop scrolling to the bottom.
I haven't tried it with an Android/Xamarin project, but I assume the output window behaves the same for all project types.
Place your cursor in output window then
autoscroll on Ctrl+End
autoscroll off Ctrl+Home

Android Studio Android DDMS display issue

I'm using Android Studio 0.7 and while i normally find it quite pleasant to work with, its logcat support is intermittent at best. Now i've somehow gotten myself into a bit of an interface conundrum. Something i did inadvertently with the Android DDMS window at the bottom has meant that "Devices" and "logcat", which are normally in a two-paned window together (e.g. "Devices | logcat"), have become separate. As a result i can no longer view the filter box and the logcat output without switching panes, which as you can imagine is a real PAIN! (pun unintended but welcomed)
Here are some screenshots - at the top you see two shots of the two panes in their current separated form in v0.7, and below you see what it normally looks like (from v0.8). It's like i've somehow lost the whole header for the individual panes...
I've looked at all the buttons nearby, looked through all the settings, and googled as best i can, and i just can't figure it out. Can anybody help me? At the moment i can only hope that google fixes their developer L preview so i can actually start using 0.8 but who knows how long that will be....
In Intellij IDEA 13.1.5 for Mac, press Fn in keyboard, drag 'Devices' window to 'logcat' window, done!
Click and drag the part I highlighted in Red. When it becomes a separate box, just close it by clicking on the X on the top right.

How to stop logcat from scrolling in Android Studio

I used Eclipse before and I could easily stop logcat from scrolling, but I can't find same funcionality in Android studio. Anyone knows how to do it?
There's no dedicated button for this, but you can just click on / highlight some text around where you want to stop scrolling.
android studio have this feature
you just click on the line three times and you can selectd the line , it will stops scrolling.
I had the same issue. Simple solution:
In Android monitor, on the right, change No Filters -> Show only selected application.
Android Studio Stop scrolling log
Disable Scroll to the end
If not - you are able to scroll to necessary line manually and LogCat will not be automatically scroll to down
I actually just had a problem (in 1.2.2) where I couldn't keep it from scrolling. I tried all the tricks and proper methods mentioned here, but it kept scrolling out from under me.
Turns out there was a problem trying to connect to an emulator that had long since been disconnected, and it kept retrying. And every time it did, it reloaded everything causing logcat to refresh. So it wasn't REALLY scrolling, it just felt like it was because of how big the buffer is.
I unplugged my physical device (that was running along side the emulator), restarted Android Studio, plugged the physical device back in, and boom, it no longer kept "scrolling".
Hopefully this might help someone else. Because I was getting incredibly frustrated for a while, there.
Goodness, the trick is to search. Search for something within LogCat and then scrolling will stop. Tested: running Android Studio 1.1.0 against a real device (S5). Also, was ticking one line up and one back down until I then right clicked. Then it totally stopped. After that, I can remove the search and the scrolling is no longer automatic.

How can I stop the LogCat output from scrolling automatically in Eclipse?

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.
In the LogCat tab on the upper far right there is a down pointing arrow with a line under it to enable
"Scroll Lock"
On older versions it's a pause button to
"Pause receiving new logcat messages"
That should do the trick!
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 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.
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.
You can do adb logcat in a shell, and use your terminal app's scroll buffer and scrolling features to manage the logcat output.
Window => Preferences => Android => Logcat
Uncheck the box called:
Display logcat view when there are messages from
an application into the workspace
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.
I also think it is "more aggressive" since the latest update! And it actually stops auto-scrolling when I scroll 10 or more lines up.
The best solution I have is clicking in the line you are interested in. If the logcat scrolls down too far and you don't see your line any more just press ArrowUp or ArrowDown to jump back to the line you were looking at.
If you write pid:pidofyourapp (which is written under online column in Device tab) in the search box,it will show the logs you wrote in your application.

Logcat data not displaying in the Log Tab of DDMS Eclipse

The log tab is visible in DDMS and I have been logging data using Log.v(...) for many a week now without any problems.
Today, the log data is now longer being displayed in the Log window. Worked, then did a programming change to track a bug and now the log data is no longer showing.
Have tried running the app on an external Android phone, on the Android Simulator and it makes no difference.
Have closed down Eclipse, reloaded and still no change.
The console displays activity but only to the point of starting the activity.
The external phone is set up for debugging - not that this could be a problem since I have the same problem with the simulator
It looks like I have inadvertantly set something incorrectly but can't remember changing anything :-(
Anyone come across this problem before - have looked at previous posts but none seem relevant.
Regards,
Oliver
I had the same problem a while back. I was using the emulator and device for debugging. Apparently you have to select the device listed in the DDMS view whose logs you want to see. My logs were blank because the device that I was expecting logs from was not the one selected.
Hope that helps
Tried this:
https://stackoverflow.com/a/9826502/1238317
Check in your logcat window - TOP RIGHT corner PAUSE button || (Pause
receiving new logcat messages)
Few clicks + eventually restart eclipse (usually works in my case)
Check your LogCat window to see if you are filtering and make sure to set the debug level to Verbose.
There are possible reasons and solutions:
LogCat might have to much in cache, clear the log and see if it fixed the issue
You might need to select the device in the device view (even if it is already selected, try to click on it)
adb is not correctly working anymore, try to kill and start it again
Check if you see output if you use the command line adb logcat
Just go to DDMS perspective and click on the device's name in upper left corner and done your log cat will Start with a BOOm :P
In Android Studio, which I have found to be much more reliable and intuitive than Eclipse, I found this to be a common issue. For me what solves it (device is automatically set when running your app) besides checking code, is to Quit and restart the emulator or Quit Android Studio and Emulator and reopen/restart

Categories

Resources