In HTML, you can use vConsole on the phone to view the logs printed on the H5 page

  <script src="https://wechatfe.github.io/lib/vconsole/3.4.1/vconsole.min.js"></script>
  <script>
    window.vConsole = new window.VConsole();
    // the page is listening to the js error
    window.onerror = function (message, url, line, column, error) {
      console.log('log---onerror::::',message, url, line, column, error);
    }
  </script>
Copy the code