Remote debugging Chrome for iOS

前端 未结 4 1171
刺人心
刺人心 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 18:51

    The Firefox Tools Adaptor allows one to use Firefox DevTools to debug websites on Safari or Google Chrome for iOS or Android.

    https://github.com/mozilla/valence#debugging-safari-firefox-and-other-webviews-on-ios

    0 讨论(0)
  • 2021-02-08 18:58

    I've had some success with the iOS remote debug webkit adapter.

    Install ios-webkit-debug-proxy and libimobiledevice

    npm install remotedebug-ios-webkit-adapter -g

    Enable remote debugging in Safari - iOS Settings => Safari preferences => enable "Web Inspector"

    Make your computer trust your iOS device- starting iTunes could prompt the "Trust this computer" dialog.

    remotedebug_ios_webkit_adapter --port=9000

    Open tabs should show up in chrome://inspect/#devices

    0 讨论(0)
  • 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

    0 讨论(0)
  • 2021-02-08 19:04

    Is it true that I need Safari on MacOS X to remote debug Chrome for iOS?

    As far as I understand, yes.

    Does Desktop Chrome allow anything?

    No

    Is Chrome for iOS just a webview application?

    Yes, the app would be rejected otherwise, this is why Mozilla originally did not build a browser for iOS.

    0 讨论(0)
提交回复
热议问题