Skip to content

Latest commit

 

History

History
59 lines (35 loc) · 2.04 KB

how-to-debug-remote-ios-device-using-chrome-devtools.md

File metadata and controls

59 lines (35 loc) · 2.04 KB

How to debug remote iOS device using Chrome devtools.

How to debug remote iOS device using Chrome devtools

After whole night surfing in internet, I've found Google's repository about proxying DevTools for iOS. They offer Mobile Safari remote inspector, you can do it from Safari's developer tab, but if you're Chrome DevTools dependent developer like me, you may need to follow this article.


Installing:

Only thing you need to install is ios-webkit-debug-proxy via homebrew or apt-get:

Mac:

brew install ios-webkit-debug-proxy

Linux:

sudo apt-get install autoconf automake libusb-dev libusb-1.0-0-dev libplist-dev libplist++-dev usbmuxd libtool libimobiledevice-dev

git clone [email protected]:google/ios-webkit-debug-proxy.git
cd ios-webkit-debug-proxy

./autogen.sh
make
sudo make install

Running:

Open Safari on your Simulator, or device first and run (Chrome v45+ tested)

ios_webkit_debug_proxy -f chrome-devtools://devtools/bundled/inspector.html

It will detect your available devices and list them on port :9221:


Note: due the error that Chrome does not allow opening the chrome-devtools:// url from DOM, you may need to navigate there by clicking on Open in new tab or copy the given url and paste it to your address bar.

It should be like this:

chrome-devtools://devtools/bundled/inspector.html?ws=localhost:{portNumber}/devtools/page/1

Note 2: You'll probably need to enable Settings > Safari > Advanced > Web Inspector

For the first time, it'll maybe throw an error that couldn't connect to Safari on device (even if you have Web Inspector enabled). Try to remove usb cable and plug it again.