Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Mobile Debugging
Remy Sharp
September 21, 2012
Technology
75
9k
Mobile Debugging
Mobile debugging is a bitch. Let's talk about that, and then fix it.
Remy Sharp
September 21, 2012
Tweet
Share
More Decks by Remy Sharp
See All by Remy Sharp
Using a Modern Web to Recreate 1980s Horribly Slow & Loud Loading Screens
rem
0
45
Recreating the ZX Spectrum loader with Web APIs
rem
0
68
Living Standard
rem
1
110
State of the Gap
rem
1
570
The Art of Debugging
rem
2
1.6k
EdgeConf - Progressive Enhancement
rem
0
96
Toxic Side of Free. Or: how I lost the love for my side project.
rem
0
480
Muddling my way through real time
rem
0
420
The Bits Behind JS Bin
rem
4
640
Other Decks in Technology
See All in Technology
THETA Xの登場はジオ業界を変えるか?
furuhashilab
0
160
Adopting Kafka for the #1 job site in the world
ymyzk
1
250
Power BI Premiumでデータ準備!
hanaseleb
1
180
Power BI ”を” 可視化しよう!
hanaseleb
0
140
220428event_ogura_part
caddi_eng
0
180
Motto Go Forward スライドトップと Goを支える文化とコミュニティ してご利用ください 〜なぜ我々はコミュニティにコントリ ビュートするのか〜
luccafort
0
160
Devに力を授けたいSREのあゆみ / SRE that wants to empower developers
tocyuki
3
440
Steps toward self-service operations in eureka
fukubaka0825
0
400
HTTP Session Architecture Pattern
chiroito
1
350
街じゅうを"駅前化"する電動マイクロモビリティのシェアサービス「LUUP」のIoTとSRE
0gm
1
480
220428event_karibe_part
caddi_eng
0
180
読者のことを考えて書いてみよう / Write with your reader in mind
line_developers
PRO
3
230
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
29
4.3k
Code Review Best Practice
trishagee
41
6.7k
Design by the Numbers
sachag
271
17k
Large-scale JavaScript Application Architecture
addyosmani
499
110k
Adopting Sorbet at Scale
ufuk
63
7.5k
Why Our Code Smells
bkeepers
PRO
324
54k
For a Future-Friendly Web
brad_frost
164
7.4k
The Straight Up "How To Draw Better" Workshop
denniskardys
225
120k
Facilitating Awesome Meetings
lara
29
3.9k
Documentation Writing (for coders)
carmenhchung
48
2.5k
A designer walks into a library…
pauljervisheath
196
16k
How To Stay Up To Date on Web Technology
chriscoyier
780
250k
Transcript
Mobile Debugging Remy Sharp / @rem
Debugging is a... http://www.flickr.com/photos/grill/2655848033
...and I ❤ debugging http://www.flickr.com/photos/grill/2655848033
Back in early 2000
Our first mobile webapp circa 1999 Amazingly actually still live!!!
XML parsing :( (but strict is strict)
None
http://www.flickr.com/photos/60119893@N00/2883012011/
Art of debugging methodically Replicate so that you can Isolate
and ultimately Eliminate
Principles 1. Know thy enemy 2. Close the gap 3.
Expect the unexpected
1. Know thy enemy
ݾ൴ɼඦፌෆຆɻ “If you know both yourself and your enemy, you
can win a hundred battles without jeopardy.” http://www.flickr.com/photos/katieharbath/4856255673
Simulators mobilexweb.com/emulators
Get real devices http://www.flickr.com/photos/sidesh0w/6675107387 http://bradfrostweb.com/blog/mobile/test-on-real-mobile-devices-without-breaking-the-bank/
Get FREE devices http://www.flickr.com/photos/sidesh0w/6675107387 http://bradfrostweb.com/blog/mobile/test-on-real-mobile-devices-without-breaking-the-bank/
Share devices http://www.flickr.com/photos/sidesh0w/6675107387
http://jsconsole.com?this
Understand performance
WTF? Wikipedia has more JavaScript than Gmail? http://remysharp.com/mobile-battery-performance/
"200k of JavaScript held within a block comment adds 240ms
during page load, whereas 200k of JavaScript that is parsed during page load added 2600 ms."
Network monitoring
Charles - $50 Fiddler - windows - free
http://code.google.com/p/pcaphar
Make test cases
2. Close the gap http://www.flickr.com/photos/bowbrick/2093650123
Save Refresh
Host locally •Network Utility (mac) ifconfig en0 inet / ifconfig
eth0 ipconfig (look for ip4v) •Point mobile to that IP •localtunnel (to get out of VMs)
None
jsconsole :listen
weinre “Pronounced like the word ‘winery’. Or maybe like the
word ‘weiner’. Who knows, really.” http://www.flickr.com/photos/booleansplit/6924192819/
Adobe Shadow
iWebInspector / Hooking Web Inspector iWebInspector
jsbin.com
None
Aardwolf http://www.flickr.com/photos/brostad/6294164371
Real debuggers http://www.flickr.com/photos/sidesh0w/6675107387
Chrome for Android
:1337 http://www.flickr.com/photos/blackberryimages/6932160681
:7001
:6000
iOS6
Build your own tools http://www.flickr.com/photos/jannem/3312946500 Test for events Performance metrics
Emulate APIs & event types etc...
remote-tilt.com
jsbin 3 jsbin.com
3. Expect the unexpected http://www.flickr.com/photos/jdhancock/3669455809
Once upon a time... Demoing mobile app Same code Same
mobile device Same OS version But different result
Wifi != ISP network
msie=/*@cc_on!@*/0;
Tether and check via desktop O2 you can change username
to "bypass" to confirm bugs, not to solve them. Also will need to check with providers to be sure.
iPod Touch would crash upon render
Last resort debugging 50/50
Emulating slow connections http://www.flickr.com/photos/63885769@N00/4696519429
Network Link Conditioner (xcode + mac) Slowy.app (mac + $)
ipfw (mac / *nix) sloppy http://www.dallaway.com/sloppy/ (java app) wipfw (windows)
Beware of red herrings console.log
“When you have eliminated the impossible, whatever remains, however improbable,
must be the truth”
If all else fails, take a break.
We need to demand more
My dream: Single Debugging Tool 1. Can we build this
ourselves? 2. Can we hook in and normalise all the remote protocols? 3. Can we do step debugging?
I think so, but it'll be a challenge.....
Otherwise: rock on. @rem leftlogic.com Hire us @