23
Mobile web debugging My tricks to develop for the mobile web By: Gregers Rygg Twitter: @gregersrygg

Mobile web-debug

  • Upload
    finnno

  • View
    112

  • Download
    0

Embed Size (px)

DESCRIPTION

Slides from a lightening talk I did at the FINN tech day, about the tools I use to debug the mobile web.

Citation preview

Page 1: Mobile web-debug

Mobile web debugging

My tricks to develop for the mobile web

By: Gregers Rygg Twitter: @gregersrygg

Page 2: Mobile web-debug

Desktop

•  ”All” have developer tools •  Most are very good

Page 3: Mobile web-debug

 Inspect HTML

Page 4: Mobile web-debug

 Debug JavaScript

Page 5: Mobile web-debug

 Network analysis

Page 6: Mobile web-debug

 Console  JavaScript profiling  Performance tips  Modify CSS/JavaScript on the fly  Memory inspection  Database explorer  +++

Page 7: Mobile web-debug

Possible in Internet Explorer 6…

Page 8: Mobile web-debug

…usable in Internet Explorer 8+

Page 9: Mobile web-debug

 Console  Inspect HTML  Debug JavaScript  Network analysis  JavaScript profiling  Performance tips  Modify CSS/JavaScript on the fly  Memory inspection  Database explorer  +++

Desktop

Page 10: Mobile web-debug

 Inspect HTML  Debug JavaScript  Network analysis  JavaScript profiling  Performance tips  Modify CSS/JavaScript on the fly  Memory inspection  Database explorer

iPhone/Android (built-in)

 Console

Page 11: Mobile web-debug

 JavaScript on the fly  JavaScript profiling  Performance tips  Memory inspection

Opera Mobile + Dragonfly

 Console   Inspect HTML  Debug JavaScript  Modify CSS  Database explorer?   Network analysis

Page 12: Mobile web-debug

Yay!, but…

…unfortunately not much used (for m.finn.no)

Page 13: Mobile web-debug

 Debug JavaScript  Network analysis  JavaScript profiling  Performance tips  Memory inspection

iPhone/Android (Weinre)

 Console   Inspect HTML  Modify CSS/JavaScript on the fly  Database explorer

Page 14: Mobile web-debug

Tip #1

•  Connect to both WiFi and ethernet

Page 15: Mobile web-debug

HP ”Elite”Book

•  WiFi turns off when ethernet is connected •  BIOS Settings (reboot + ESC, then F10) •  System Configuration – Built-In Device Option •  Disable LAN/WLAN switching

Page 16: Mobile web-debug

Tip #2

•  Webkit Inspector Remote (Weinre) •  Demo time!

Page 17: Mobile web-debug

Weinre install

http://phonegap.github.com/weinre/Installing.html

$ cat ~/.weinre/server.properties boundHost: -all- httpPort: 8001

Page 18: Mobile web-debug

Weinre install

•  Start server •  Add bookmarklet •  Increase Auto-Lock time (iOS setting) to

prevent disconnect

Page 19: Mobile web-debug

<c:if test="${!empty param.weinre}"> <script src="http://${pageContext.request.serverName}:<c:out

value="${param.weinre}"/>/target/target-script-min.js#anonymous"> </script>

</c:if>

page.jsp?weinre=8001

Page 20: Mobile web-debug

<c:if test="${!empty param.weinre}"> <script src="http://${pageContext.request.serverName}:<c:out value="${param.weinre}"/>/target/target-script-min.js#anonymous">

</script>

<script>

window.console &&

(window.onerror = function(e) { console.error(e); });

</script>

</c:if>

page.jsp?weinre=8001

Page 21: Mobile web-debug

Tip #3

Charles Debugging Proxy

Page 22: Mobile web-debug

Tip #4

<style type="text/css”

media = "${param.debug != 'mobile' ?

'only screen and (max-device-width: 480px)' :

'screen'}”

>

Page 23: Mobile web-debug

Link to all tools mentioned ++ http://goo.gl/FgOg7