Remote web debugging at mobile devices in Safari and Firefox
-
Upload
dark-space-lab -
Category
Devices & Hardware
-
view
46 -
download
2
Transcript of Remote web debugging at mobile devices in Safari and Firefox
Mobile remote web debuggingPiotr Marcinkiewicz [email protected]
Agenda
Safari debugging in iOS
Firefox debugging in Android
References
Safari: major steps
Prepare desktop browser
Prepare mobile browser
Connect to device
Debug
Safari: desktop preparation
Safari contains all modules necessary for development without any downloads.
You should enable “Show Develop menu in menu bar” in your Safari preferences.
Safari: enable debugging in device
iOS’s Safari includes all modules necessary for remote web debugging
Web debugging can be enabled in Settings/Safari/Advanced/Inspect
Safari: connect from desktop to device
Connect iOS device to your desktop computer using USB cable.
Select menu Develop/Your device/Your Page
Selected page should be highlighted in your device
Safari: inspect DOM objects
Browse over DOM structure in your document and inspect objects in device with live highlight
Safari: inspect network queries
Use Safari network monitor to observe communication with HTTP server, JavaScript execution, rendering routines
Safari: execute JavaScript
Execute JavaScript statements with console at target device
Firefox: major steps
Prepare mobile browser
Configure debugging bridge
Connect
Debug
Firefox: prepare mobile browser
Input about:config into address bar in mobile Firefox at Android
Search for: devotees.debugger.remote-enabled
Set configuration value to true
Firefox: configure debugging bridge
ADB should be configured to forward ports from device to desktop.
List devices: adb devices
Port forwarding
adb -s device forward tcp:6000 localfilesystem:/data/data/org.mozilla.firefox/firefox-debugger-socket
Firefox: connect desktop
Enable Remote debugging in Firefox.
Select Connect in Tools menu
Accept connection at device
Firefox: debug remote device
Inspect remote DOM document.
Analyse network communication.
Execute JavaScript statements in device.
References
https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/Firefox_for_Android
https://developer.android.com/tools/help/adb.html
http://moduscreate.com/enable-remote-web-inspector-in-ios-6/
https://developer.mozilla.org/en-US/docs/Tools/Debugger