Start mobile browsers with webkit remote debugging ON

abernier picture abernier · Jul 20, 2011 · Viewed 16.5k times · Source

At Google I/O 2011: Chrome Dev Tools Reloaded, Paul Irish and Pavel Feldman introduced new remote debugging feature — which was in passing included into webkit.

--

This is great news, particularly for mobile web-developers. But how do we enable it, for example launching IOS simulator, or just running Safari Mobile on an iPhone? (for chrome this is traditionally done with --remote-debugging-port=9222 option while launching it).

I tried enabling developer mode in safari settings (Settings > Safari > Developer > Debug Console: ON) but without success...

I don't know about android here, but does anyone know when Apple (Safari Mobile) or Google (android's browser) will include this new feature so we can enjoy remote-debugging in mobile development?

Thank you.

Ref: http://paulirish.com/2011/a-re-introduction-to-the-chrome-developer-tools/#comment-63113

Answer

gregers picture gregers · Oct 1, 2012

Safari on iOS 6 In iOS6 you can now remote debug from Safari 6 (only OS X). On the device, open Settings > Safari > Advanced > Enable Web Inspector. Open Safari Preferences, Advanced, check "Show Develop menu in menu bar". Connect your iPhone/iPad with a USB cable. Now under the Develop menu bar you should get a submenu for you device with the tabs you have open in Safari on your device.

Safari on iOS 7 In addition to requirements above you will need Safari 6.1, which at the moment (Oct. 8th 2013) is only available as a seed for developers: https://developer.apple.com/downloads/index.action?name=Safari%206.1

Chrome on Android 4 It's a bit more complicated on Android. Instructions for remote debugging on Chrome for Android here: https://developers.google.com/chrome/mobile/docs/debugging I haven't found a way to enable remote debugging in the Android default browser (v4.04).