debugging mobile web apps
for:
by:
@pmuellr
http://muellerware.org/
for:
by:
@pmuellr
http://muellerware.org/
canonical links to presentation
slide template
last modified
This presentation will cover:
first mobile platform vendor to ship real remote Web Inspector implementation from WebKit
links
Real remote Web Inspector like Safari 6 Web Inspector
links
Real remote Web Inspector like Chrome Dev Tools
links
???
Ongoing work to get weinre running on Windows Phone.
Runs applications implemented entirely in HTML, CSS and JavaScript. [link]
Also see the slide on r2d2b2g in this presentation.
links
Chrome extension allowing you to quickly see how your application looks and functions on multiple mobile devices and platforms.
links
Firefox extension to run the Boot to Gecko desktop and apps within Firefox.
links
From the web site:
links
From the web site:
links
Popular HTML, CSS, JavaScript snippet testing environment
links
Preview and inspect web designs on mobile devices.
links
proof-of-concept project for extracting and displaying dtrace-ishly precise JavaScript performance profiling
links
function run() { rsprofiler.start("jquery profile") runTests() rsprofiler.stop(function(err) { ... }) } function runTests() { for (var i=0; i<40; i++) { runTestsDiv1(); runTestsSpan1() } } function runTestsDiv1() { for (var i=0; i<1000; i++) { $("#div-1").text() } } function runTestsSpan1() { for (var i=0; i<1000; i++) { $("#span-1").text($("#span-1").text()) } }
Hover over a box! Click a box!
sudo npm -g install weinre
links
For issues with Cordova, PhoneGap, Worklight:
weinre movies here:
old rsprofiler movie here:
the purpose of the PhoneGap project is for PhoneGap to cease to exist
same for weinre:
short term goals:
There are only two hard things in Computer Science: cache invalidation and naming things.
more from Phil Karlton:
YAILWAD (Yet another interpreted language without a debugger)
original name, remwi - REMote Web Inspector
tips:
Example: Apache Callback lasted a few weeks, renamed to Apache Cordova.
weinre is WEb INspector REmote. Pronounced like the word 'winery'. Or maybe like the word 'weiner'. Who knows, really.
server:
client/target:
why change languages?
port from scoop to CoffeeScript was automated with js2coffee
//--------------------------------------------------------- function Animal(name) { this.init(name) } Animal.prototype.init = function(name) { this.name = name } Animal.prototype.answer = function(string) { console.log(this.constructor.name + " " + this.name + ": " + string) } Animal.prototype.talk = function() { this.answer("I can't talk") } //--------------------------------------------------------- function Fish(name) { Animal.call(this, name) } Fish.prototype.__proto__ = Animal.prototype //--------------------------------------------------------- function Cat(name) { Animal.call(this, name) } Cat.prototype.talk = function() { this.answer("meow") } Cat.prototype.__proto__ = Animal.prototype
//--------------------------------------------------------- class Animal(name) this.init(name) method init(name) this.name = name method answer(string) console.log(this.constructor.name + " " + this.name + ": " + string) method talk() this.answer("I can't talk") //--------------------------------------------------------- class Fish(name) << Animal super(name) //--------------------------------------------------------- class Cat(name) << Animal super(name) method talk() this.answer("meow")
#--------------------------------------------------------- class Animal constructor: (aName) -> @init(aName) init: (aName) -> @name = aName answer: (string) -> console.log "#{@constructor.name} #{@name}: #{string}" talk: -> @answer "I can't talk" #--------------------------------------------------------- class Fish extends Animal constructor: (aName) -> super #--------------------------------------------------------- class Cat extends Animal constructor: (aName) -> super talk: -> @answer "meow"
I'm still fixing links
$ sudo npm -g install weinre
...
$ weinre
weinre: starting server ...
...
Immature poets imitate; mature poets steal; bad poets deface what they take, and good poets make it into something better, or at least something different.
- T.S. Eliot 1921, from "Philip Massinger" in "The Sacred Wood".
source code:
weinre is:
So, what's the security story?
"About security for weinre: there is none."
Biggest potential problem, leaving your weinre injection script in your HTML, in your product, on the public web. I have seen it.
<script src="http://localhost:8080/target/target-script.js"></script>
what to do about it:
biggest "security" pain in the ass:
waiting for someone to care enough to send a pull request:
"good news everyone":