Debugging a WebView (Ionic) app on Android via logcat

后端 未结 4 1193
忘了有多久
忘了有多久 2020-12-02 23:52

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

相关标签:
4条回答
  • 2020-12-03 00:34

    Alternatively when runing adb on linux or unix based os/git bash:

    adb logcat | grep 'Web Console'
    
    0 讨论(0)
  • 2020-12-03 00:38

    What works for me in 2019:

    adb -d logcat chromium:I *:S
    

    The -d indicating a physical device in my case. If all else fails just dump the results of adb logcat into a text file and do a search for "CONSOLE", that will give you the provider for your logcat filter. It seems this changes over time, and depending on your particular dev environment.

    0 讨论(0)
  • 2020-12-03 00:38

    While you can use grep under Linux/Unix, findstr might be your choice under Windows:

    adb logcat | findstr /C:"Web Console"
    

    If you prefer to use grep under Windows, you can get it from http://gnuwin32.sourceforge.net/packages/grep.htm.

    0 讨论(0)
  • 2020-12-03 00:51

    It seems that logcat can not properly parse tag names with whitespaces. So instead I suggest using grep on the device:

    adb shell "logcat | grep 'Web Console'"
    
    0 讨论(0)
提交回复
热议问题