Using LogCat for Android USB Debugging Browser

So, I run logcat on my Incredible 2 connected to my computer and try to debug the web application I'm working on. Unfortunately, the device sends spam, so I do not see any of my consoles from my javascript. Does anyone know a way to filter everything except console.logs coming from the browser? I tried to start logcat with these parameters

adb logcat -s "console"

thinking that it filters out everything except the console, as the android docs say the console.logs browser is listed in this format:

Console: Hello World http://www.example.com/hello.html :82

http://developer.android.com/guide/webapps/debugging.html

Does anyone know a real trick? Thanks.

+4
source share
3 answers

Update in new versions of Android:

 adb logcat browser:V *:S 
+9
source

Can I use console.log to specify a tag? If so, you can use logcat to retrieve only the entries with the given tag using this:

 adb logcat MYTAG:V 

It turns out that console.log () automatically defines the WebCore tag, so you can filter everything the way you want:

 adb logcat WebCore:V *:S 

This means: "Show me everything that is tagged WebCore, and nothing that is not." Other people have had success using a browser instead of WebCore ( Is there a way to enable the JavaScript / Debug Console for Safari on Android? ), Try both and see what works.

+2
source

Any of the above solutions do not work for me. I did this, saved the logs in a file using the option to save and search for the text "Web console" in the file using notepad ++.

0
source

Source: https://habr.com/ru/post/1393288/


All Articles