Inspect The Uninspected

cgack 426 views 54 slides Sep 13, 2014
Slide 1
Slide 1 of 54
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54

About This Presentation

Web sites and web applications provide a special flavor of debugging for developers. The techniques used can range from archaic and brute force alert() debugging, to simply altering the code and refreshing your browser until it seems to work. Ideally you will utilize some more advanced developer too...


Slide Content

Inspect The Uninspected Cory Gackenheimer

About Me Job @Healthx Open Source Contributor jQuery Mobile Mozilla Author Node.js Recipes available @ apress.com Screencast available soon @ safaribooksonline.com Debugging Mobile Web Applications http://leanpub.com/DebuggingMobile

What’s Covered First Steps Using Desktop Browsers for mobile development Life outside of browser vendors’ Silos The Promising Future

First Steps

☢ alert(); Debugging ☢

w ebpagetest.org

webpagetest.org

http://www.browserstack.com/responsive

Modern Browser Tools

Firebug Features Console HTML view CSS Panel Script Panel Net DOM Cookies! Special Mobile Features? No Firefox only

Firebug Dock Right or Left Resize panel for responsive breakpoint testing Tip: use the option “Vertical Panels” to limit UI noise when docked left or right.

Firebug

Firebug lite Limited Firebug features as a bookmarklet Can be used in nearly any browser No real-time editing features but does include: Console HTML Inspector CSS Panel Script Panel (view only) DOM Panel No special mobile features

IE’s F12 Tools Features DOM Explorer Console Debugger Networking UI Responsiveness Profiler Memory Mobile Special Features Emulation (also emulate old IE here)

F12 Tools

Safari Developer Tools Features Resources Timelines Debugger Console Inspect Node Layers Special Mobile Features Remote Debugging

Safari Developer Tools

Safari Developer Tools Remote Debug Pre- requisites Enabled on iOS Device Settings > Safari > Advanced > Web Inspector

Safari Developer Tools

Chrome Developer Tools Features Elements panel Network panel Sources Timeline Profiles Resources Audits Console

Chrome Developer Tools Mobile features Devices Emulation Network Throttling Remote Debugging

Chrome Developer Tools

Chrome Developer Tools

Chrome Developer Tools

Opera Developer Tools Features Elements Network Sources Timeline Profiles Resources Audits Console Task manager Mobile features Devices Emulation Remote Debugging

Opera Developer Tools Emulation Touch Events User Agents Device Metrics Geolocation Orientation CSS Media

Opera Developer Tools

Opera Developer Tools

Firefox Developer Tools Features Inspector Console Debugger Style Editor Performance Network Shader Editor Canvas Web Audio Editor Developer Toolbar

Firefox Developer Tools Mobile Features Remote Debugging Responsive Design Tool Web IDE

Firefox Developer Tools

Firefox Responsive Design Tool

Firefox Developer Tools

Firefox Developer Tools

Firefox Developer Tools

Outside The Browser Silos

jsconsole.com Browser Based Tool Can add a script to a remote page for console access I use it for quick access while developing and accessing old Android

jsconsole.com

jsconsole.com

jsconsole.com

jsconsole.com

jsconsole.com

WEINRE WEb INspector REmote

WEINRE

WEINRE Add target script to your source < script src ="http://a.b.c:8080/target/ target-script- min.js#target " ></script>

WEINRE

A Promising Future

Remote Debugging Protocol Every Vendor has one A Unified one would be great We could then use <insert favorite tools> to debug anything

Remote Debugging Protocol A first glimpse of unification https://github.com/campd/fxdt-adapters / Use Firefox Developer Tools to debug Firefox Firefox for Android FirefoxOS Chrome Chrome for Android iOS Safari

Remote Debugging Protocol

Fxdt -adapters Still Early Experiments Lots of manual configuration Manual port forwarding Run > node proxy.js ios_webkit -debug-bridge for safari Basically an Add-on for Firefox that bridges the debugging protocol gap

Fxdt -Adapters

The End Questions? @cgack

Resources http://people.apache.org/~pmuellr/weinre-docs/latest / http:// jsconsole.com/remote-debugging.html https:// getfirebug.com/wiki/index.php/Main_Page https://developer.apple.com/library/safari/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/Introduction/Introduction.html http://msdn.microsoft.com/library/ie/bg182326(v=vs.85) https :// developer.chrome.com/devtools https://dev.opera.com / https:// developer.mozilla.org/en-US/docs/Tools
Tags