old-netflux-blog/content/post/remotedebug-webkit-ios-13.md

1.9 KiB

title slug date draft tags
Remote-debugging iOS devices in Webkit and Firefox on Linux linux-chrome-devtools-firefox-ios 2020-06-07T18:54:08+02:00 false
coding
webkit
linux

I choose Linux for my desktop computing environment but frequently have to debug web pages in iOS devices using Chrome or Safari.

These steps successfully enabled live debugging for iOS devices in Chrome devtools (and should also work in Mozilla Debugger, but I haven't tested this yet.)

Testing environment:

  • Ubuntu 18.04
  • Chrome 81

It seems that the master branch of libusbmuxd (and possibly other libraries) is required to ensure compatibility with iOS 13. This requires building from source on Linux.

I pushed a Docker image that automates these steps: https://github.com/rfwatson/remotedebug-ios-webkit-adapter-docker

Non-container steps:

1. Install libplist

git clone https://github.com/libimobiledevice/libplist.git
cd libplist
./autogen.sh
make
sudo make install

2. Install libusbmuxd

git clone https://github.com/libimobiledevice/libusbmuxd.git
cd libusbmuxd
./autogen.sh
make
sudo make install

3. Install libimobiledevice

git clone https://github.com/libimobiledevice/libimobiledevice.git
cd libimobiledevice
./autogen.sh
make
sudo make install

4. Install ios-webkit-debug-proxy

git clone https://github.com/google/ios-webkit-debug-proxy.git
cd ios-webkit-debug-proxy
./autogen.sh
make
sudo make install

5. Install remotedebug-ios-webkit-adapter

npm install remotedebug-ios-webkit-adapter -g

6. Set up device

  • Plug in iOS device via USB port, ensure it is trusted.
  • Check that Settings > Safari > Advanced > Web Inspector is enabled.

7. Start the proxy

remotedebug_ios_webkit_adapter --port=9000

8. Configure Chrome and/or Firefox

See here.