Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to debug chrome in any IOS device

Is there any way to debug chrome browser on IOS device?

If there is no way, how i can approach to bug in chrome on ios?

Searched the web and didn't find sufficient answer.

like image 764
Alexander Gorelik Avatar asked Jul 04 '16 07:07

Alexander Gorelik


People also ask

How do I debug Chrome mobile iOS?

In Chrome on your iPad or iPhone, go to chrome://inspect and then press Start Logging. Now go do your thing in another tab, keeping this tab open. Come back anytime to see any and all console outputs!

How do I view the console log in Chrome iOS?

Enable JavaScript log collection by navigating to chrome://inspect in Chrome for iOS and leaving that tab open to collect logs. In another tab, reproduce the case for which you are interested. Then switch back to the chrome://inspect tab to view the collected logs.

Can you debug on iPhone?

Here's how: Open the iPhone Settings menu. On an iPhone with an early version of iOS, access the Debug Console through Settings > Safari > Developer > Debug Console. When Safari on the iPhone detects CSS, HTML, and JavaScript errors, details of each display in the debugger.


2 Answers

If you don't need full debugging support, you can now view JavaScript console logs directly within Chrome for iOS at chrome://inspect.

https://blog.chromium.org/2019/03/debugging-websites-in-chrome-for-ios.html

Chrome for iOS Console

like image 155
MikecheckDev Avatar answered Oct 12 '22 13:10

MikecheckDev


Old Answer (July 2016):

You can't directly debug Chrome for iOS due to restrictions on the published WKWebView apps, but there are a few options already discussed in other SO threads:

  1. If you can reproduce the issue in Safari as well, then use Remote Debugging with Safari Web Inspector. This would be the easiest approach.

  2. WeInRe allows some simple debugging, using a simple client-server model. It's not fully featured, but it may well be enough for your problem. See instructions on set up here.

  3. You could try and create a simple WKWebView browser app (some instructions here), or look for an existing one on GitHub. Since Chrome uses the same rendering engine, you could debug using that, as it will be close to what Chrome produces.

There's a "bug" opened up for WebKit: Allow Web Inspector usage for release builds of WKWebView. If and when we get an API to WKWebView, Chrome for iOS would be debuggable.

Update January 2018:

Since my answer back in 2016, some work has been done to improve things.

There is a recent project called RemoteDebug iOS WebKit Adapter, by some of the Microsoft team. It's an adapter that handles the API differences between Webkit Remote Debugging Protocol and Chrome Debugging Protocol, and this allows you to debug iOS WebViews in any app that supports the protocol - Chrome DevTools, VS Code etc.

Check out the getting started guide in the repo, which is quite detailed.

If you are interesting, you can read up on the background and architecture here.

like image 25
Gideon Pyzer Avatar answered Oct 12 '22 14:10

Gideon Pyzer