Remote debugging Chrome for iOS

前端 未结 4 1174
刺人心
刺人心 2021-02-08 18:19

I\'m trying to debug an error on Chrome for iPad. How can I do that?

Additional info:

I know how to debug Safari for iOS. I just don\'t have a Mac at th

4条回答
  •  南方客
    南方客 (楼主)
    2021-02-08 19:02

    You cannot directly remote debug Chrome on iOS currently. It uses a uiWebView that may act subtly different than Mobile Safari

    You have a few options.

    Option 1: Remote-debug Mobile Safari using Safari's inspector. If your issue reproduces in Mobile Safari, this is definitely the best way to go. In fact, going through the iOS simulator is even easier.

    Option 2: Use Weinre for a slimmed down debugging experience. Weinre doesn't have much features but sometimes it's good enough.

    Option 3: Remote debug a proper uiWebView that functions the same.

    Here's the best way to do this. You'll need to install XCode.

    1. Go to github.com/paulirish/iOS-WebView-App and "Download Zip" or clone.
    2. Open XCode, open existing project, and choose the project you just downloaded.
    3. Open WebViewAppDelegate.m and change the urlString to be the URL you want to test.
    4. Run the app in the iOS Simulator.
    5. Open Safari, Open the Develop Menu, Choose iOS Simulator and select your webview.
    6. Safari Inspector will now be inspecting your uiWebView.

    enter image description here

    enter image description here

    enter image description here

提交回复
热议问题