Upgrade to Pro — share decks privately, control downloads, hide ads and more …

H5 Mobile 开发调试实践

H5 Mobile 开发调试实践

H5 Mobile 移动端开发及调试工具、技巧实践分享

破锣锅

July 26, 2013
Tweet

More Decks by 破锣锅

Other Decks in Programming

Transcript

  1. GMFY$PNCP npm install flex-combo sudo flex-combo -u /apps/et/trip-html5/act -c utf8

    The Flex-combo is a javascript and css file combo server. It support various kinds of combo format by modify configuration(eg. yahoo combo). Default, it's a taobao format combo.
  2. 8PSL'MPX Step: 1: Code 2: Preview in Browser 3: Enter

    URL on mobile Device 4-11: Repeat #3 (for 8 and more Devices) 12: Change Code 13: Preview in Browser 14-21: Refresh 8 Devices 22: Run into debugging need
  3. 1$ %FTLUPQ Console HTML Inspector JavaScript Debug Network Inspector Performance

    Tips Modify CSS/JavaScript Memory Inspector Database Inspector etc.
  4. .PCJMF ) Console HTML Inspector JavaScript Debug Network Inspector Performance

    Tips Modify CSS/JavaScript Memory Inspector Database Inspector etc.
  5. 1. Safari Mobile Debugger 2. Webkit Remote Debugger 3. iWebInspector

    4. Opera Dragonfly 5. Chrome for Android Web Inspector 6. Firefox for Android Remote Debugging 7. Socketbug 8. weinre 9. jsconsole.com, jsbin.com 10. Adobe Edge Inspect
  6. "QBDIF ProxyRequests On ProxyVia On <Proxy *> Order deny,allow Deny

    from all Allow from all </Proxy> http:/ /httpd.apache.org/docs/2.2/mod/mod_proxy.html
  7. "QBDIF ProxyRequests On ProxyVia On <Proxy *> Order deny,allow Deny

    from all Allow from all </Proxy> http:/ /httpd.apache.org/docs/2.2/mod/mod_proxy.html
  8. 䔍ࠦॆ៽䕏时䝀调 • Chrome Remote Debugging on Android • iOS Remote

    Debugging with Safari • jsConsole Online • Webkit Inspector Remote(Weinre)
  9. $ISPNF3FNPUF%FCVHHJOHPO"OESPJE + Remote debugging on Device (using GDT) - Requires

    ADK/ADB, USB Cable (or hack) - Not for Android < 4 ICS, no Android 2/3! - A Lot to Setup/Maintain (for just a fraction) = Limited use for real world needs
  10. J043FNPUF%FCVHHJOH 1. Enable Web Inspector on your Phone 2. Connect

    your iPhone or iPad to your Mac 3. In Safari’s Preferences pane under Advanced, check the Show Develop menu in the menu bar checkbox. 4. Select the Develop menu, and your iDevice should be a menu option.
  11. J043FNPUF%FCVHHJOH + Convenient: Build in - No CSS/DOM Editing -

    No Breakpoints - JS Logs are truncated = Limited use for real world needs
  12. KT$POTPMF jsconsole.com is a simple JavaScript command line tool. However,

    it also provides the ability to bridge across to other browser windows to remotely control and debug that window - be it in another browser or another device altogether.
  13. KT$POTPMF + Remote DOM on Device + Any Browser/OS +

    Sits online, no local stuff to maintain + Truly remote - Console only - Needs JS inside your code to connect - Still need to go device by device = Powerful partial solution
  14. XFJOSF Weinre is a project of the Apache Foundation and

    stands for Web Inspector Remote and is exactly what it’s name suggests, a tool in the same vein as Firebug or Webinspector but, able to run and debug web pages remotely. So, if you have used tools such as the Firefox Developer Tools or Chrome Dev Tools, using Weinre will be second nature. Weinre Install • Start Server. • Add Bookmarklet. • Increase Auto-Lock Time(iOS Setting) to Prevent Disconnect. npm -g install weinre weinre --boundHost 127.0.0.1 --httpPort 9090 Another Option http://debug.phonegap.com
  15. XFJOSF + Remote DOM on Device + iOS, Android &

    BlackBerry + Node.js port now much less hairy to setup than former Java based one - Needs JS inside your code to connect - Still need to go device by device = Powerful partial solution
  16. 'JEEMFS The free web debugging proxy for any browser, system

    or platform. • Monitor HTTP/HTTPs traffic from any browser • Inspect and debug traffic from any client • Tamper client requests and server responses • Test the performance of your web sites and apps • Decrypt HTTPS web sessions • Extend Fiddler as much as you want
  17. $IBSMFT Charles is a web proxy (HTTP Proxy / HTTP

    Monitor) that runs on your own computer. Your web browser (or any other Internet application) is then configured to access the Internet through Charles, and Charles is then able to record and display for you all of the data that is sent and received. $50
  18. $IBSMFT • SSL Proxying – view SSL requests and responses

    in plain text • Bandwidth Throttling to simulate slower Internet connections including latency • AJAX debugging – view XML and JSON requests and responses as a tree or as text • AMF – view the contents of Flash Remoting / Flex Remoting messages as a tree • Repeat requests to test back-end changes • Edit requests to test different inputs • Breakpoints to intercept and edit requests or responses • Validate recorded HTML, CSS and RSS/atom responses using the W3C validator