Logging and crash stack traces not showing in Android Studio

By : benwad
Source: Stackoverflow.com

I'm trying to debug an app on my device and I'm having a bit of trouble with the debugger. I tried testing the logger to see if it would write to Logcat like so:

Log.d("MyActivity", "Testing logging...");

But nothing shows up in Logcat with the app: com.myapp.debug filter. It comes up when I simply filter by string (using my app name) but the entry looks like this:

01-08 13:45:07.468  29748-29748/? D/MyActivity﹕ Testing logging...

Does this question mark mean that something in the app is not getting passed through to the debugger? This might relate to my second issue with the debugger:

I've been debugging a crash and every time it happens, the phone simply shows the 'App is not responding' message then closes the current activity, disconnects the debugger, and the app keeps on running with the previous activity. No stack trace, no info about the crash, nothing. Is there something I need to set up in Android Studio to get this working?

By : benwad


Probably your google analytics "ga_reportUncaughtExceptions" is set to true, turning it to false fixes the issue and exceptions get printed to logcat.Please refer to below link for further details.

Why does android logcat not show the stack trace for a runtime exception?

I think it is the same adb or filer problem. At first remove all filters. Restart adb - type in terminal adb kill-server

By : QArea

This video can help you solving your question :)
By: admin