To debug the mobile terminal page on the pc, you need to do the following steps
1. Download the micro-channel web developer tools ;
2. Open WeChat developer tools and select mobile debugging
3. Choose a request and copy the cookie
4. Open the developer tools on the computer chrome, switch to the console and enter the following code (for authentication)
5. If it is a WeChat page, you need to use chrome to simulate the user-agent of the WeChat browser. The tutorial is as follows:
If you find it troublesome, you can directly use the browser that comes with the WeChat developer tool to open the WeChat page. The user agent inside is for the mind by default.
After completing the above steps, you can open the mobile page or WeChat webpage on your computer normally.
If your WeChat account is added to the official account web developer list.
You can directly enter the original link address in the WeChat web developer tool, and you can debug it on your computer. (Because the background needs to jump several times, come Get the cookie. Finally, the address copied by WeChat can't get the data)
In this method, the code must be deployed to the server before it can be debugged. At present, the automation of the project is fairly convenient. As long as grunt $build, the code will be automatically deployed to the server.
If you want to debug directly in the local development environment, as long as you get the cookie, you can solve all problems.
The debugger of the WeChat web developer tool is the same as chrome, so it is very convenient to copy the cookie. Next, refer to the above PC debugging method.
If you use a mac and have an iphone, you can use the following method
Note: Ignore the third step of the tutorial and do not need xcode. As long as it is a webview, it can be debugged directly