Debug webView embedded web pages

Add the following code to webView on android, you can debug in chrome, open chrome://inspect/#devices on chrome
if (Constant.DEBUG && Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
    WebView.setWebContentsDebuggingEnabled(true);
}
 Another way to debug is through vconsle, https://github.com/WechatFE/vConsole
 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326405243&siteId=291194637