How To Enable Webkit's Remote Debugging/inspector Of Android App Using Webview?
Solution 1:
For android >= 4.4 (kitkat)
See Remote debugging on Android with Chrome
For android < 4.4 (Lower versions)
Use very good open source tool: weinre. See this video for help to use it. If you are familiar with grunt then you can use grunt-weinre
For quick view:
- install weinre using npm
- Do the configuration in your gruntfile.
- Run the weinre grunt task.
- Use this script to inject the weinre target code into your web page.
- Open http://localhost:8082 in your browser and you will find devices running above script. You can debug all this devices.
NOTE: if you want to debug webview/browser in your mobile device then you need to replace localhost with your machine's IP running weinre. And yes, all the devices should be on the same network.
Solution 2:
Now it is easy with Android 4.4. See https://developers.google.com/chrome-developer-tools/docs/remote-debugging#debugging-webviews
Solution 3:
You can do remote debugging targeting the Android Browser with the weinre project. Or use Chrome remote debugging with the Chrome for Android browser. As far as I know, you can't target a WebView directly, but targeting the Android Browser should get you close.
Solution 4:
It cannot be done, because the debugger backend code is not there. The source code you are referencing to is a copy of webkit source in android, but it is not compiled into android release bits.
Solution 5:
Pre KitKat jsHyBugger works well ( trial version and annual single user license €29 )
( I have no connection to the developers / have purchased a license )
Post a Comment for "How To Enable Webkit's Remote Debugging/inspector Of Android App Using Webview?"