Background:
Since there are various types of mobile phones on the market, especially Android phones, different problems occur in h5 pages of WAP terminals on different mobile phones, but they are not easy to debug, and they cannot be seen in mobile phone simulators on PC terminals, which causes great difficulties for development. Therefore, we urgently need a method that can debug real phones
Android real phone debugging (including wechat)
Materials:
Tools Chrome
Key point: get science to get online
The browser page to debug:
Open developer mode on the phone
Android data cable (capable of transmitting data)
Open the way, please baidu
Always allow device access
Debugging steps:
-
Connect your phone to your computer via a USB cable (a USB cable that connects data)
-
//inspect to open Chrome ://inspect to view the following interface
- To debug a page, click on the corresponding url
Debug the wechat page
Because most of the Android phone wechat is based on wechat X5 kernel, so in wechat open X5 kernel inspect that can be achieved through, Chrome remote real machine debugging wechat page.
Some mobile phone wechat does not have X5 kernel by default, wechat open the URL debugmm.qq.com/?forcex5=tr… Install the X5 kernel
Open mode.
Open X5 DEBUG URL via wechat (debugx5.qq.com)
Select info TAB to enable TBS kernel debugging.
Open the page with wechat. You can find the URL address for review and modification in the first step.
IOS Real Phone Debugging (Mac + iPhone)
Step 1: Go to iPhone Settings > Safari > Advanced > JavaScript + Web Inspector
Step 2: Open Safari on your Mac and choose Preferences > Advanced > Display the Develop menu in the menu bar
Step 3: Connect your Mac and iPhone with original data and choose to trust the device. Then open the page you need to debug m2.qschou.com in the mobile Safari browser, click the Safari development menu, select iPhone, and you can see the newly opened m2.Qschou.com. Click, and the debugger will appear
You can leave a message in the comments section if you don’t understand