logcat

Using adb logcat with a real phone (and not the emulator)

寵の児 提交于 2019-11-27 03:59:35
问题 when I'm using the Android emulator I can do "adb logcat" to see output messages (log / system.out.println) originated from my code. It also shows the stack trace of exceptions which happen during execution. But, when I'm using a real phone, "adb logcat" does not do / show anything. I also tried "adb -d logcat" which also does not display anything. Is there any way to get it working with the real phone? Thanks. UPDATE: I just tried "adb -s ? logcat" ('?' is the serial number of the device)

Why are Log.d() and Log.v() not printing

倾然丶 夕夏残阳落幕 提交于 2019-11-27 03:44:00
问题 I have the following test code in my Activity: @Override public void onStart() { super.onStart(); Log.e(CLASS_NAME, "ERROR onStart()"); Log.w(CLASS_NAME, "WARN onStart()"); Log.i(CLASS_NAME, "INFO onStart()"); Log.d(CLASS_NAME, "DEBUG onStart()"); Log.v(CLASS_NAME, "VERBOSE onStart()"); On the logcat view in Android Studio, it only prints: 02-10 15:56:10.190 6194-6194/org.example.my_app E/MyActivity﹕ ERROR onStart() 02-10 15:56:10.190 6194-6194/org.example.my_app W/MyActivity﹕ WARN onStart()

Logcat not showing errors from my Huawei P9 phone

落花浮王杯 提交于 2019-11-27 02:54:26
问题 I am using Android Studio 2.3 and my phone is Huawei P9 Lite. I noticed that my logcat does not show errors from my phone. For example if I have code that will crash because of NullPointerException and I run it on emulator I get exception in logcat (font color: red) and popup saying MyApplication stopped working , but if I run same that code on my phone, i just get crash popup and nothing in logcat. Info messages are displayed, but errors are not. What do I need to do in order to show error

Android studio maximum number of lines logcat

血红的双手。 提交于 2019-11-27 01:59:34
问题 I'm testing with a real device connected to Android Studio. Because of multithreading behavior that I don't want to interrupt I've added lots of log statements to my code to find out what's happening. In logcat I see the statements comming, so far so good. After running my complete test I found out that the beginning of my logging is missing! Seems to me that Android Studio deletes the earliest lines of logging when the log is in danger of growing too big. Since I would like to retrieve my

E/art﹕ Failed sending reply to debugger: Broken pipe, but application still runs

亡梦爱人 提交于 2019-11-27 01:48:39
问题 When I run my application many lines appear in the logcat but only one error: E/art﹕ Failed sending reply to debugger: Broken pipe . What does it mean? And how can I fix it? 回答1: Explaining the error: E/ART: Failed sending reply to debugger: Broken pipe. What is E/ART? ART is the A ndroid R un T ime. This is the bytecode interpreter on your Android phone. The E simply indicates the logging level of ERROR . What is "sending reply to debugger"? Debugging on the Android phone is done using the

Filter tags in LogCat (in Android Eclipse Plug-In)

折月煮酒 提交于 2019-11-27 01:19:54
问题 There is a TextField "Filter" below the LogCat output. However, it seems to filter only the Message-column. Id like to filter Tags also. Because there are my class names. How can I achieve it? 回答1: There's a button that looks like a green + in the upper right of the log cat window, if you mouse over it says "Create Filter" in the popup from that you can filter by log tag. It creates a new tab in log cat with the filter name you specified. Then all of the output of that tag will go to that tab

Android Logcat is empty when debug with device in android studio

谁说我不能喝 提交于 2019-11-27 01:15:41
问题 When I try to debug using android device in android studio Logcat shows nothing. But when I use emulator LogCat shows all the messages. How should view the Logcat messages when debugging on actual device? Thank You ! 回答1: In Android studio 0.8.0 you should enable ADB integration through Tools -> Android, before run your app. Then the log cat will work correctly. Notice that if you make ADB integration disabled while your app is running and again make it enable, then the log cat dosen't show

Debugging a WebView (Ionic) app on Android via logcat

橙三吉。 提交于 2019-11-27 01:10:45
问题 There are several questions about the subject, however not one of them seems to address the particular problem I'm having. I'm developing an app with Cordova/Ionic, and printing debugging info I was outputting with console.log() by using adb logcat CordovaLog:D *:S was working just fine until some updates. Now I can't seem to figure out how to properly filter logcat's output so I could only get the debugging info from my app. Logging itself works. If I set no filters and redirect output to a

LogCat Stops Running in Eclipse Needs Restart

孤街醉人 提交于 2019-11-27 00:49:52
问题 Periodically LogCat will stop showing messages even though I am in debug mode. At other times it will display only one line at a time! I have a solution, restart eclipse. But I would like to understand this better. It takes too much time to restart eclipse when this happens. I have seen this behavior on the emulator and connected to a device. Either the LogCat shows one line with no history or nothing. 回答1: Yes, I can get the normal logcat back by clear the log. Also I uncheck the "Limit

Where are Android logcat files stored?

拈花ヽ惹草 提交于 2019-11-27 00:34:46
问题 I'm looking for the log file(s) that are made by logcat. Where are they typically stored? 回答1: They are stored as circular memory buffers on the device. If you run "adb logcat > myfile" on your host system, you can retrieve the content into a file. 回答2: To get post-mortem information from a device it is helpful to see the timestamp as well. To let you know when the event occurred, try: adb logcat -d -v time > logfile.txt 回答3: If you just want to see the current contents of the log, you can do