Web Debugging Tool for iOS--weinre

Source: Internet
Author: User

Project

Http://people.apache.org/~pmuellr/weinre/docs/latest/Running.html

Principle

1 using NONDEJS to establish a server;

2 Insert a JS into the Debug Web page using the injection method. This JS will be as far as possible to intercept the implementation of the page to get the upper layer of data, such as Ajax requests, but like a picture directly loaded, and so on is not available. At the same time to the server to send a heartbeat code, or return command results, the meeting is called the Debug page;

3 have a PC on the server IP, will open a like Firebug interface, this is called the Debug table page;

In this way, the debug page and the Debug desk page use JS through the server to send commands to each other, transfer data, to achieve debugging purposes. Because of such a feature, JS can not do things, then, you will not be able to debug;


Use:

1. Installing Nodejs:yum install Nodejs in CentOS

Install yum install NPM

Installing Npm-g Install Weinre

Start Weinre--httpport--boundhost-all---verbose true--debug true


Get a bookmark from the Debug page:

JavaScript: (function (e) {e.setattribute ("src", "<a href=" http://192.168.0.100/target/target-script-min.js# Anonymous ");d ocument.getelementsbytagname (" body ") [0].appendchild (e);}) (Document.createelement ("script")), void (0 "=" ">http://192.168.0.100/target/target-script-min.js#anonymous"); document.getElementsByTagName ("Body") [0].appendchild (e);}) (Document.createelement ("script")); void (0);


Open the page click on bookmark injection, Discover Safari support, UC Filter JavaScript protocol, chrome needs to manually input javascript: Then paste the next part (it is estimated to be a simple paste of javascript: partially filtered out), But its bookmark is normal, but, the bookmark click will occupy the current page, so, can not be used, if the debug page does not have to be in the frame and the top of the processing, you can use the IFRAME in each browser to use this feature,


After the injection succeeds, it sends the data to the server that it is the Debug object.


Use the server IP in the PC to open can see the use of detailed, OK, look at the debugging interface bar.



But, it is recommended to modify these JS, so that these features more easy to use, at least the debug page is hung, do not refresh the console page .... Dead hair data is also nothing, it is not production environment, needless to say, was debugged object does not exist, it will automatically hang off themselves.


On the other AppStore there is a thing called Mihtool. It is the people who use this to add some iOS features, but it is the principle of this thing, just to facilitate some features,

I used the ipad Air 1 debug to find that it's poor performance .... Lost contect from time to time, and using CentOS to get the second change. Therefore, there is no need to use this tool.


If someone has intercepted Safari's network floor. Get more like img loading, CSS loading, video loading and the like, that's pretty much the same.

Because of the convenience of the relatively many of the functions of the function for me is not very big.

Performance can not be compared with their own server.


Web Debugging Tool for iOS--weinre

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.