Debug ipad safari with a PC

后端 未结 8 896
挽巷
挽巷 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条回答
  •  猫巷女王i
    2020-11-28 02:09

    Update October 2019

    This solution doesn't work for IOS 12+ (resource 1, resource 2).

    Updated and tested on 24/6/2017

    Using Chrome on Windows 8 and more recent:

    • Download and install Node
    • Download and install ITunes and connect it to your Device. (A pop-up should shows to your iPad to get authorization) . Be sure to allow web inspector in your iPad

    • Download and install the remote webkit adapter

    Using Powershell (As administrator):

    npm install remotedebug-ios-webkit-adapter -g

    • Execute the adapter:

    Using Powershell (as administrator):

    remotedebug_ios_webkit_adapter --port=9000

    You should get a similar output:

    C:\Windows\system32> remotedebug_ios_webkit_adapter --port=9000 remotedebug-ios-webkit-adapter is listening on port 9000 iosAdapter.getTargets ...

    • Open Chrome and go to the following link:

    chrome://inspect/#devices

    • Click on configure next to "Discover network targets" and add the following: localhost:9000

    Make sure to have the web page you want debug open on safari, you should see it on chrome inspector page under Remote Target

    Extra step for iOS 11 Thanks to @skaurus

提交回复
热议问题