Debugging Mobile Web
   Apps Remotely
       James Thomas
Why do people like
developing applications
     for the web?
Debugging Tools
Firefox
Chrome
?
Mobile Platforms
Mobile Platforms
Web Inspector Remote
> GOTO DEMO
How does it work?
Weinre
Debug Target            Client
               Server
Insert custom JS into
               target

                            Weinre
      Debug Target                              Client
                            Server




<script src="http://server:8080/target/target-script-min.js"/>
Connect to client

               Weinre
Debug Target            Client
               Server
Client generates debug
            events

                           Weinre
     Debug Target                             Client
                           Server




{"args":["alert("hello")","console",true,"442489609::27"...
Target evaluates and
         sends response

                        Weinre
     Debug Target                        Client
                        Server




{"interface":"WeinreTargetCommands","method":"sendCli
entCallback".....
WebKit Inspector
updated with response

               Weinre
Debug Target            Client
               Server
Running a server
 locally? Ugh :(
debug.phonegap.com
What are the other
  alternatives?
JS Console
WebKit Remote Debug


                Text
                 Text




Chromium --remote-debugging-port=9222
Summary
Summary

• Weinre is a great solution for mobile
  environments...
Summary

• Weinre is a great solution for mobile
  environments...


• ...but hopefully a temporary one!
Summary

• Weinre is a great solution for mobile
  environments...


• ...but hopefully a temporary one!
• Not finished, follow the progress on Github
Thank you &
 Questions?

Debugging mobile apps