SlideShare une entreprise Scribd logo
1  sur  71
Télécharger pour lire hors ligne
Debugging web apps on mobile devices




Dale Lane

http://dalelane.co.uk/blog
@dalelane
Who am I?
●   Emerging Technologies Specialist for IBM
●   Native mobile developer                ●   Web developer for
    since 1999                                 desktops since 1999
    ●   Palm OS                                ●   jQuery
    ●   Pocket PC                              ●   Dojo
    ●   BlackBerry
    ●   Android

                     ●   Mobile web developer
                         since 2011...
                         ●   jQuery Mobile
                         ●   Dojo Mobile
Who are you?
●   You know web development
●   You haven't worked out all the tricks for
    developing web apps for mobile, yet


●   Right?
Web debugging on the desktop
●   What tools are available?
Web debugging on the desktop
●   Firebug
Web debugging on the desktop
●   WebKit Web Inspector
Web debugging on the desktop
●   IE Development Tools
Web debugging on the desktop
●   What do we use them for?
Web debugging on the desktop
●   What do we use them for?
    ●   Stepping through code
Web debugging on the desktop
Web debugging on the desktop
●   What do we use them for?
    ●   Stepping through code
    ●   Console log, debug, info, error, dir ...
Web debugging on the desktop
Web debugging on the desktop
●   What do we use them for?
    ●   Stepping through code
    ●   Console log, debug, info, error, dir …
    ●   Evaluating at the console
Web debugging on the desktop
Web debugging on the desktop
●   What do we use them for?
    ●   Stepping through code
    ●   Console log, debug, info, error, dir …
    ●   Evaluating at the console
    ●   Manipulating and querying the DOM
Web debugging on the desktop
Web debugging on the desktop
●   What do we use them for?
    ●   Stepping through code
    ●   Console log, err, dir …
    ●   Evaluating at the console
    ●   Manipulating and querying the DOM
    ●   etc...
Web debugging on mobile
●   alerts
●   console on Mobile
    Safari
weinre
●   Web Inspector Remote
weinre
●   Open source
weinre
●   Demo time
weinre
●   Demo time
    ●   View the DOM
weinre
weinre
●   Demo time
    ●   View the DOM
        –   Select parts of the page
        –   View style properties of page elements
weinre
●   Demo time
    ●   View the DOM
    ●   Edit the DOM
weinre
weinre
●   Demo time
    ●   View the DOM
    ●   Edit the DOM
        –   Edit text in the page
        –   Edit style of something
        –   Disable CSS rules
weinre
●   Demo time
    ●   View the DOM
    ●   Edit the DOM
    ●   Interactive console
weinre
weinre
●   Demo time
    ●   View the DOM
    ●   Edit the DOM
    ●   Interactive console
        –   Tab complete
        –   Alerts that pop up on the phone
        –   Edit the page using document access
        –   Run a function on the page
weinre
●   Demo time
    ●   View the DOM
    ●   Edit the DOM
    ●   Interactive console
    ●   Log and trace
weinre
weinre
●   Demo time
    ●   View the DOM
    ●   Edit the DOM
    ●   Interactive console
    ●   Log and trace
        –   Console log, error, debug
weinre
●   Demo time
    ●   View the DOM
    ●   Edit the DOM
    ●   Interactive console
    ●   Log and trace
    ●   Storage
weinre
weinre
●   Demo time
    ●   View the DOM
    ●   Edit the DOM
    ●   Interactive console
    ●   Log and trace
    ●   Storage
        –   Inspect local and session storage
        –   Edit storage items
weinre
●   Demo time
    ●   View the DOM
    ●   Edit the DOM
    ●   Interactive console
    ●   Log and trace
    ●   Storage
    ●   Timing
weinre
weinre
●   Demo time
    ●   View the DOM
    ●   Edit the DOM
    ●   Interactive console
    ●   Log and trace
    ●   Storage
    ●   Timing
        –   Show events from timer and replay
        –   console.markTimeline
weinre
●   Demo time
    ●   View the DOM
    ●   Edit the DOM
    ●   Interactive console
    ●   Log and trace
    ●   Storage
    ●   Timing
How does it work?
●   Three parts:
    ●   Debug target
    ●   Server
    ●   Client
How does it work – debug target?
    ●   Your webpage + some weinre-specific JS
        ●   Client-side hooks overriding JavaScript
            functions to send output to...




http://code.google.com/chrome/devtools/docs/remote-debugging.html
How does it work – server?
●   A Java server built using Jetty
How does it work – client?
How does it work?
●   Three parts:
    ●   Debug target
    ●   Server
    ●   Client
How does it work?
●   In the future...




               http://code.google.com/chrome/devtools/docs/remote-debugging.html
What does it use?
●   Apache CLI
●   Jetty
●   Apache Wink JSON4J
●   WebKit's Web Inspector
What is supported?
●   Supported:
    ●   DOM and CSS inspector
    ●   localStorage and WebSQL inspector
    ●   Event timeline
    ●   console
What is supported?
●   Not supported:
How to use it
<html>
<head>
                 <script
   <script src=”...”>
                 src=”http://yourhost:8080/target/target
</head>
                 -script-min.js”></script>
<body>




</body>
</html>
How to run it on your own machine

$ java -jar weinre.jar –-boundHost -all-
How to run it on your own machine
How to run it on your own machine
<html>
<head>
                 <script
   <script src=”...”>
                 src=”http://9.12.229.221:8080/target/ta
</head>
                 rget-script-min.js”></script>
<body>




</body>
</html>
How to run it on your own machine
                           A tip for debugging on the Android emulator...




 <script src="http://10.0.2.2:8080/target/target-script-min.js"></script>
How to run it on a Mac
How to let someone else run it
How to inject it into a web page
Platform support

http://mobilehtml5.org/
Where to go
●   Discussion
    ●   http://groups.google.com/group/weinre
Where to go
●   Source and issues
    ●   https://github.com/phonegap/weinre
Where to go
●   Documentation
    ●   http://phonegap.github.com/weinre/
Where to go
●   Documentation
    ●   http://code.google.com/chrome/devtools/docs/overview.html
Where to go
   ●   Download
       ●   http://phonegap.github.com/weinre/




https://github.com/phonegap/weinre/archives/master
Thanks – for creating it

Patrick Mueller


Emerging Technologies
Specialist, IBM



@pmuellr



http://muellerware.org/
Thanks – for introducing me to it
 Making a web app for
 iPhone back in
 January – that kept
 crashing Mobile
 Safari...




                           The app:
http://dalelane.co.uk/blog/?p=1625

           Investigating the crashes:
http://dalelane.co.uk/blog/?p=1652
Thanks – for introducing me to it
                                James Thomas

                                Emerging Technologies
                                Specialist, IBM
                                @thomasj




    http://vimeo.com/26258998
An alternative: jsconsole




http://www.jsconsole.com/remote-debugging.html
An alternative: Opera DragonFly



http://opera.com/dragonfly/documentation/remote/
An alternative: BlackBerry Playbook




     http://devblog.blackberry.com/2011/06/
           debugging-blackberry-web-apps/
An alternative: socketbug




http://socketbug.com/
Any questions?

Dale Lane

@dalelane

Contenu connexe

Tendances

Phone gap
Phone gapPhone gap
Phone gap
caviare
 
Building Native Mobile Applications with PhoneGap
Building Native Mobile Applications with PhoneGapBuilding Native Mobile Applications with PhoneGap
Building Native Mobile Applications with PhoneGap
Simon MacDonald
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGap
degarden
 

Tendances (20)

PhoneGap: Building Mobile Applications with HTML/JS
PhoneGap: Building Mobile Applications with HTML/JSPhoneGap: Building Mobile Applications with HTML/JS
PhoneGap: Building Mobile Applications with HTML/JS
 
Skip the IDE with PhoneGap Build
Skip the IDE with PhoneGap BuildSkip the IDE with PhoneGap Build
Skip the IDE with PhoneGap Build
 
From mobile browser to mobile app
From mobile browser to mobile appFrom mobile browser to mobile app
From mobile browser to mobile app
 
Adobe and Modern Web Development
Adobe and Modern Web DevelopmentAdobe and Modern Web Development
Adobe and Modern Web Development
 
Building Hybrid Applications using PhoneGap
Building Hybrid Applications using PhoneGapBuilding Hybrid Applications using PhoneGap
Building Hybrid Applications using PhoneGap
 
Debugging and deploying with phone gap
Debugging and deploying with phone gapDebugging and deploying with phone gap
Debugging and deploying with phone gap
 
Developing with Phonegap - Adobe Refresh 2012
Developing with Phonegap - Adobe Refresh 2012Developing with Phonegap - Adobe Refresh 2012
Developing with Phonegap - Adobe Refresh 2012
 
Phone gap
Phone gapPhone gap
Phone gap
 
All About Phonegap
All About Phonegap All About Phonegap
All About Phonegap
 
Building mobile apps using Phonegap
Building mobile apps using PhonegapBuilding mobile apps using Phonegap
Building mobile apps using Phonegap
 
dotFes KYOTO - スマホ開発にAIR & PhoneGapを勧める5つの理由
dotFes KYOTO - スマホ開発にAIR & PhoneGapを勧める5つの理由dotFes KYOTO - スマホ開発にAIR & PhoneGapを勧める5つの理由
dotFes KYOTO - スマホ開発にAIR & PhoneGapを勧める5つの理由
 
WebDU Keynote
WebDU KeynoteWebDU Keynote
WebDU Keynote
 
Building Native Mobile Applications with PhoneGap
Building Native Mobile Applications with PhoneGapBuilding Native Mobile Applications with PhoneGap
Building Native Mobile Applications with PhoneGap
 
The Future of HTML5 Motion Design
The Future of HTML5 Motion DesignThe Future of HTML5 Motion Design
The Future of HTML5 Motion Design
 
DevChatt 2011 - PhoneGap: For Fun and Science
DevChatt 2011 - PhoneGap: For Fun and ScienceDevChatt 2011 - PhoneGap: For Fun and Science
DevChatt 2011 - PhoneGap: For Fun and Science
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGap
 
Mobile apps with Umbraco and Phonegap
Mobile apps with Umbraco and PhonegapMobile apps with Umbraco and Phonegap
Mobile apps with Umbraco and Phonegap
 
Flash: A call for sanity
Flash: A call for sanityFlash: A call for sanity
Flash: A call for sanity
 
Wes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your ApplicationWes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your Application
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGap
 

Similaire à Debugging Web Apps on Real Mobile Devices

State of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront ConferenceState of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront Conference
dmethvin
 
Phonegap for Engineers
Phonegap for EngineersPhonegap for Engineers
Phonegap for Engineers
Brian LeRoux
 
Behaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with DrupalBehaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with Drupal
smithmilner
 

Similaire à Debugging Web Apps on Real Mobile Devices (20)

Passing the Joel Test in the PHP World (phpbnl10)
Passing the Joel Test in the PHP World (phpbnl10)Passing the Joel Test in the PHP World (phpbnl10)
Passing the Joel Test in the PHP World (phpbnl10)
 
Phonegap Development & Debugging
Phonegap Development & DebuggingPhonegap Development & Debugging
Phonegap Development & Debugging
 
You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)
 
Montreal.rb 2022-10-05 - Glimmer DSL for SWT - Ruby Desktop Development GUI ...
 Montreal.rb 2022-10-05 - Glimmer DSL for SWT - Ruby Desktop Development GUI ... Montreal.rb 2022-10-05 - Glimmer DSL for SWT - Ruby Desktop Development GUI ...
Montreal.rb 2022-10-05 - Glimmer DSL for SWT - Ruby Desktop Development GUI ...
 
Apache Cordova, Hybrid Application Development
Apache Cordova, Hybrid Application DevelopmentApache Cordova, Hybrid Application Development
Apache Cordova, Hybrid Application Development
 
State of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront ConferenceState of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront Conference
 
Txjs
TxjsTxjs
Txjs
 
Scraping the web with Laravel, Dusk, Docker, and PHP
Scraping the web with Laravel, Dusk, Docker, and PHPScraping the web with Laravel, Dusk, Docker, and PHP
Scraping the web with Laravel, Dusk, Docker, and PHP
 
Phonegap for Engineers
Phonegap for EngineersPhonegap for Engineers
Phonegap for Engineers
 
Debugging and Tuning Mobile Web Sites with Modern Web Browsers
Debugging and Tuning Mobile Web Sites with Modern Web BrowsersDebugging and Tuning Mobile Web Sites with Modern Web Browsers
Debugging and Tuning Mobile Web Sites with Modern Web Browsers
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
 
Head first android apps dev tools
Head first android apps dev toolsHead first android apps dev tools
Head first android apps dev tools
 
Webview: The fifth element
Webview: The fifth elementWebview: The fifth element
Webview: The fifth element
 
20 tips for website performance
20 tips for website performance20 tips for website performance
20 tips for website performance
 
Performance Optimization for Mobile Web | Fresh Tilled Soil
Performance Optimization for Mobile Web | Fresh Tilled SoilPerformance Optimization for Mobile Web | Fresh Tilled Soil
Performance Optimization for Mobile Web | Fresh Tilled Soil
 
Go with the Flow - A Guide to a WordPress Workflow
Go with the Flow - A Guide to a WordPress WorkflowGo with the Flow - A Guide to a WordPress Workflow
Go with the Flow - A Guide to a WordPress Workflow
 
"WebView, the fifth element" por @fernando_cejas
"WebView, the fifth element" por @fernando_cejas"WebView, the fifth element" por @fernando_cejas
"WebView, the fifth element" por @fernando_cejas
 
Inspect The Uninspected
Inspect The UninspectedInspect The Uninspected
Inspect The Uninspected
 
Get responsive in 30 minutes (WordCamp Sofia)
Get responsive in 30 minutes (WordCamp Sofia)Get responsive in 30 minutes (WordCamp Sofia)
Get responsive in 30 minutes (WordCamp Sofia)
 
Behaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with DrupalBehaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with Drupal
 

Plus de Dale Lane

Plus de Dale Lane (20)

Describing Kafka security in AsyncAPI
Describing Kafka security in AsyncAPIDescribing Kafka security in AsyncAPI
Describing Kafka security in AsyncAPI
 
Our NASA Space Apps Challenge 2019 entry
Our NASA Space Apps Challenge 2019 entryOur NASA Space Apps Challenge 2019 entry
Our NASA Space Apps Challenge 2019 entry
 
Useful Kafka tools
Useful Kafka toolsUseful Kafka tools
Useful Kafka tools
 
An intro to serverless and OpenWhisk for Kafka users
An intro to serverless and OpenWhisk for Kafka usersAn intro to serverless and OpenWhisk for Kafka users
An intro to serverless and OpenWhisk for Kafka users
 
How to increase the social impact you make
How to increase the social impact you makeHow to increase the social impact you make
How to increase the social impact you make
 
Introducing Machine Learning to Kids
Introducing Machine Learning to KidsIntroducing Machine Learning to Kids
Introducing Machine Learning to Kids
 
Introducing machine learning to kids
Introducing machine learning to kidsIntroducing machine learning to kids
Introducing machine learning to kids
 
Small Spaces, Big Ideas - our Space Apps Challenge
Small Spaces, Big Ideas - our Space Apps ChallengeSmall Spaces, Big Ideas - our Space Apps Challenge
Small Spaces, Big Ideas - our Space Apps Challenge
 
Owls
OwlsOwls
Owls
 
The skills implications of Cognitive Computing
The skills implications of Cognitive ComputingThe skills implications of Cognitive Computing
The skills implications of Cognitive Computing
 
Conversational Internet - Creating a natural language interface for web pages
Conversational Internet - Creating a natural language interface for web pagesConversational Internet - Creating a natural language interface for web pages
Conversational Internet - Creating a natural language interface for web pages
 
GaianDB
GaianDBGaianDB
GaianDB
 
Pushing, pulling or leaving the door open
Pushing, pulling or leaving the door openPushing, pulling or leaving the door open
Pushing, pulling or leaving the door open
 
Push notifications
Push notificationsPush notifications
Push notifications
 
Fire Eagle Guest Pass
Fire Eagle Guest PassFire Eagle Guest Pass
Fire Eagle Guest Pass
 
Monitoring your electricity usage
Monitoring your electricity usageMonitoring your electricity usage
Monitoring your electricity usage
 
CurrentCost
CurrentCostCurrentCost
CurrentCost
 
An introduction to Windows Mobile development
An introduction to Windows Mobile developmentAn introduction to Windows Mobile development
An introduction to Windows Mobile development
 
An Introduction to Windows PowerShell
An Introduction to Windows PowerShellAn Introduction to Windows PowerShell
An Introduction to Windows PowerShell
 
Mowing the lawn
Mowing the lawnMowing the lawn
Mowing the lawn
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 

Debugging Web Apps on Real Mobile Devices

  • 1. Debugging web apps on mobile devices Dale Lane http://dalelane.co.uk/blog @dalelane
  • 2. Who am I? ● Emerging Technologies Specialist for IBM ● Native mobile developer ● Web developer for since 1999 desktops since 1999 ● Palm OS ● jQuery ● Pocket PC ● Dojo ● BlackBerry ● Android ● Mobile web developer since 2011... ● jQuery Mobile ● Dojo Mobile
  • 3. Who are you? ● You know web development ● You haven't worked out all the tricks for developing web apps for mobile, yet ● Right?
  • 4. Web debugging on the desktop ● What tools are available?
  • 5. Web debugging on the desktop ● Firebug
  • 6. Web debugging on the desktop ● WebKit Web Inspector
  • 7. Web debugging on the desktop ● IE Development Tools
  • 8. Web debugging on the desktop ● What do we use them for?
  • 9. Web debugging on the desktop ● What do we use them for? ● Stepping through code
  • 10. Web debugging on the desktop
  • 11. Web debugging on the desktop ● What do we use them for? ● Stepping through code ● Console log, debug, info, error, dir ...
  • 12. Web debugging on the desktop
  • 13. Web debugging on the desktop ● What do we use them for? ● Stepping through code ● Console log, debug, info, error, dir … ● Evaluating at the console
  • 14. Web debugging on the desktop
  • 15. Web debugging on the desktop ● What do we use them for? ● Stepping through code ● Console log, debug, info, error, dir … ● Evaluating at the console ● Manipulating and querying the DOM
  • 16. Web debugging on the desktop
  • 17. Web debugging on the desktop ● What do we use them for? ● Stepping through code ● Console log, err, dir … ● Evaluating at the console ● Manipulating and querying the DOM ● etc...
  • 18. Web debugging on mobile ● alerts ● console on Mobile Safari
  • 19. weinre ● Web Inspector Remote
  • 20. weinre ● Open source
  • 21. weinre ● Demo time
  • 22. weinre ● Demo time ● View the DOM
  • 24. weinre ● Demo time ● View the DOM – Select parts of the page – View style properties of page elements
  • 25. weinre ● Demo time ● View the DOM ● Edit the DOM
  • 27. weinre ● Demo time ● View the DOM ● Edit the DOM – Edit text in the page – Edit style of something – Disable CSS rules
  • 28. weinre ● Demo time ● View the DOM ● Edit the DOM ● Interactive console
  • 30. weinre ● Demo time ● View the DOM ● Edit the DOM ● Interactive console – Tab complete – Alerts that pop up on the phone – Edit the page using document access – Run a function on the page
  • 31. weinre ● Demo time ● View the DOM ● Edit the DOM ● Interactive console ● Log and trace
  • 33. weinre ● Demo time ● View the DOM ● Edit the DOM ● Interactive console ● Log and trace – Console log, error, debug
  • 34. weinre ● Demo time ● View the DOM ● Edit the DOM ● Interactive console ● Log and trace ● Storage
  • 36. weinre ● Demo time ● View the DOM ● Edit the DOM ● Interactive console ● Log and trace ● Storage – Inspect local and session storage – Edit storage items
  • 37. weinre ● Demo time ● View the DOM ● Edit the DOM ● Interactive console ● Log and trace ● Storage ● Timing
  • 39. weinre ● Demo time ● View the DOM ● Edit the DOM ● Interactive console ● Log and trace ● Storage ● Timing – Show events from timer and replay – console.markTimeline
  • 40. weinre ● Demo time ● View the DOM ● Edit the DOM ● Interactive console ● Log and trace ● Storage ● Timing
  • 41. How does it work? ● Three parts: ● Debug target ● Server ● Client
  • 42. How does it work – debug target? ● Your webpage + some weinre-specific JS ● Client-side hooks overriding JavaScript functions to send output to... http://code.google.com/chrome/devtools/docs/remote-debugging.html
  • 43. How does it work – server? ● A Java server built using Jetty
  • 44. How does it work – client?
  • 45. How does it work? ● Three parts: ● Debug target ● Server ● Client
  • 46. How does it work? ● In the future... http://code.google.com/chrome/devtools/docs/remote-debugging.html
  • 47. What does it use? ● Apache CLI ● Jetty ● Apache Wink JSON4J ● WebKit's Web Inspector
  • 48. What is supported? ● Supported: ● DOM and CSS inspector ● localStorage and WebSQL inspector ● Event timeline ● console
  • 49. What is supported? ● Not supported:
  • 50. How to use it <html> <head> <script <script src=”...”> src=”http://yourhost:8080/target/target </head> -script-min.js”></script> <body> </body> </html>
  • 51. How to run it on your own machine $ java -jar weinre.jar –-boundHost -all-
  • 52. How to run it on your own machine
  • 53. How to run it on your own machine <html> <head> <script <script src=”...”> src=”http://9.12.229.221:8080/target/ta </head> rget-script-min.js”></script> <body> </body> </html>
  • 54. How to run it on your own machine A tip for debugging on the Android emulator... <script src="http://10.0.2.2:8080/target/target-script-min.js"></script>
  • 55. How to run it on a Mac
  • 56. How to let someone else run it
  • 57. How to inject it into a web page
  • 59. Where to go ● Discussion ● http://groups.google.com/group/weinre
  • 60. Where to go ● Source and issues ● https://github.com/phonegap/weinre
  • 61. Where to go ● Documentation ● http://phonegap.github.com/weinre/
  • 62. Where to go ● Documentation ● http://code.google.com/chrome/devtools/docs/overview.html
  • 63. Where to go ● Download ● http://phonegap.github.com/weinre/ https://github.com/phonegap/weinre/archives/master
  • 64. Thanks – for creating it Patrick Mueller Emerging Technologies Specialist, IBM @pmuellr http://muellerware.org/
  • 65. Thanks – for introducing me to it Making a web app for iPhone back in January – that kept crashing Mobile Safari... The app: http://dalelane.co.uk/blog/?p=1625 Investigating the crashes: http://dalelane.co.uk/blog/?p=1652
  • 66. Thanks – for introducing me to it James Thomas Emerging Technologies Specialist, IBM @thomasj http://vimeo.com/26258998
  • 68. An alternative: Opera DragonFly http://opera.com/dragonfly/documentation/remote/
  • 69. An alternative: BlackBerry Playbook http://devblog.blackberry.com/2011/06/ debugging-blackberry-web-apps/