Debug ipad safari with a PC

后端 未结 8 895
挽巷
挽巷 2020-11-28 01:34

I want to test my website on Safari on my ipad. I only have another PC. Is there a way for me to do remote debugging like ADB with mobile Chrome? I searched on StackOverflow

8条回答
  •  没有蜡笔的小新
    2020-11-28 02:15

    See monkeythedev's answer for the easiest way to debug on a Windows 8+ machine with iOS 9+. I updated my blog post using information from that answer and other sources and also recorded a screenshare. The method below should still work for iOS 8 and down, if needed.

    There is actually a pretty easy way to debug a website in Safari on iOS using Firefox on a Windows machine.

    NOTE: Ryan wrote in the comments below that this may only work on iOS 8 and down. I am unable to confirm, but be aware.

    I wrote a detailed blog post about this, but here are the highlights:

    1. Install iTunes to get the "Apple Mobile Device Support" and "Apple Application Support" applications that come with it. (uninstall iTunes afterward, if you want)
    2. Connect your iOS device via USB.
    3. Enable web inspector on iOS (available on iOS 6 and later).
    4. Open Safari on your iOS device and browse to a website.
    5. Open Firefox on your Windows machine and press Shift + F8 to open WebIDE, which should include the necessary Valance add-on, if you use Firefox Developer Edition (any version) or Firefox 37 and later (any channel).
    6. For some reason, I couldn't get it to connect to my iOS device until I downloaded the ios-webkit-debug-proxy-win32 program and ran it. It opens a blank Command Prompt, but after I went back to WebIDE after opening it, I disconnected, then reconnected, and I saw debug info for the website I had opened in Safari. You may not need to do this though, as another user just had to add an exception to their firewall then disconnect/reconnect, and it worked.

    The debug info available isn't as exhaustive as Chrome Developer Tools (specifically no "Networking" tab), but it was enough for me to be able to view what was going on in the Console.

提交回复
热议问题