iOS Safari debug iOS App Web page

Source: Internet
Author: User

Overview

The current mobile development process to use a lot of H5, JS and so on, and the debugging of these web pages in the Xcode console is not very clear, often our mobile app is the method of running, but can not show the effect of the response, this time may have been an error, But we don't see these errors in the Xcode console. At this point we can use the powerful Safari browser to open the development mode to connect the iphone to debug the app face of the Web page.

Safari settings

Open Safari Preferences settings, select "Advanced Menu", at the bottom of the page see "Show development menu in the menu" check box, check box tick, so set up to see the development menu in the Safari menu

iphone settings

Open iphone Settings App Choose Safari, find advanced options, have javascript switch Web Inspector switch, speak two switches are open

Debugging

Here, the preparation is completed. At this point the iphone link to the Mac, open Safari browser, run the mobile app inside the Web page, in the development menu select the connected phone, find the Debugging Web page, you can debug in Safari

Mobile phone Screen Cutting

Safari Debug Window

Safari Console

You can see the Safari console by right-clicking in Safari and selecting check elements. If you do not see the Check element option, open the development options according to the safari settings above

iOS Safari debug iOS App Web page

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.