Adb logcat - how does it work?

hi guys good morning, can anyone explain in detail how adb logcat works to find errors in apps?

1 Like
2 Likes

Also see

1 Like

This is how you run it for silent logs:

adb logcat -s <Name>

Filter only the errors out:

adb logcat -e <Name>

Print all text in the logcat live:

adb logcat

To install that, go to Android developers page, download that, add the “bin” directory path to PATH env and it is done.

1 Like

@Xoma
add the “bin” directory path to PATH env and it is done.

I don’t know how to do this. Can you be clearer? thank you

when you download platform tools (adb) you will extract it, you will find a “bin” directory inside that, go into that, copy the path and then add the path to Environment Variables (user/global)

You can download adb from Downloads - ADB Shell

If you wish there is no need to add to bin. Unzip file to a folder, go to that folder, click on bar, type cmd and a command prompt window will open. Then you can start logcat

animation29

2 Likes

@dora_paz
perfect, now how do i spot errors?
The screen looks like a matrix to me

Did You try CTRL+C ?

@Rogerio_Rios
Did You try CTRL+C ?

to see the errors?

If you want to get logs of only your apps then run adb logcat | findstr {PACKAGE_NAME} and this will show you the logs that contains your application package. Easier to isolate error

1 Like

To stop "matrix screen’…

1 Like

@dora_paz
If you want to get logs of only your apps then run adb logcat | findstr {PACKAGE_NAME} and this will show you the logs that contains your application package. Easier to isolate error

if I type adb logcat | findstr {PACKAGE_NAME} I have as answer unable to open CHAT

Unless you provided a custom package name from project settings then package name of your app will be in the form of io.kodular.your_email.yourappname

if it show something like this, whats is the problem and what the solution ? because my apk is just force closed

Look from the line java.lang.NullPointerException: Attempt to invoke... its a Kodular Web View Bug.

1 Like

thank you for the answer, do you have any suggestion ?