During the development of uniapp, debug the webview of app, WeChat applet and h5

    Because the webview is used in the development, because of some problems, it is necessary to track and debug the webview, but because the app and h5 are different from the WeChat applet, it needs to be mentioned separately.

    1. H5

    This is relatively simple, because it is all in chrome, you can use F12

 2. For WeChat Mini Programs

      Because ordinary uniapp pages can be displayed through F12, but the relevant content embedded in the webview cannot be seen, which is very inconvenient.

       But the WeChat applet development tool can be convenient, that is, the crawler icon marked in red below can track the content in the webview.

3. app

    The method of tracking webview on the mobile phone is also introduced by the official website.

 1. Open webview debugging (open the project in Hbuild, select view --> display Wbeiview console)

 2. Open the chrome browser: chrome://inspect/#devices This page

 I am the page identified above, click the inspect of the corresponding page, you can see the style, etc., it seems that it cannot be opened

Debugging with the view of hbuilderX and webview, it seems that the mobile phone cannot be detected

 But I can use the mobile phone to debug the real machine, and the mobile phone can be detected, so I can't find the reason yet.

Guess you like

Origin blog.csdn.net/qq_40032778/article/details/129209646