This repository was archived by the owner on Dec 9, 2018. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathjs_debugging.html
More file actions
Latest commit
145 lines (123 loc) · 6.13 KB
/
Copy pathjs_debugging.html
File metadata and controls
145 lines (123 loc) · 6.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html>
<html>
<head>
<metacharset="utf-8">
<title>Ladies Learning Code - JavaScript March 18, 2012</title>
<metaname="viewport" content="width=1280">
<!-- CoderDeck core and extension CSS files -->
<linkrel="stylesheet" href="src/deck.js/core/deck.core.css" type="text/css">
<linkrel="stylesheet" href="src/deck.js/extensions/navigation/deck.navigation.css">
<linkrel="stylesheet" href="src/deck.js/extensions/status/deck.status.css">
<linkrel="stylesheet" href="src/deck.js/extensions/hash/deck.hash.css">
<linkrel="stylesheet" href="src/deck.js/extensions/menu/deck.menu.css">
<linkrel="stylesheet" href="src/css/prettify.css">
<linkrel="stylesheet" href="src/css/deck.coder.css">
<linkrel="stylesheet" href="src/codemirror/lib/codemirror.css">
<linkrel="stylesheet" href="src/codemirror/theme/default.css">
<!-- Custom for LLC -->
<linkhref='http://fonts.googleapis.com/css?family=Istok+Web' rel='stylesheet' type='text/css'>
<linkhref='http://fonts.googleapis.com/css?family=Podkova' rel='stylesheet' type='text/css'>
<linkrel="stylesheet" id='style-theme-link' href="src/css/coderdeck.css" type="text/css" >
<styletype="text/css"></style>
</head>
<bodyclass="deck-container">
<scripttype='text/coderdeck' id='coderdeck-default'>
<html>
<head>
<scriptsrc='src/jquery.min.js'>SCRIPTEND</head>
<body>CODE</body>
</html>
</script>
<scripttype='text/coderdeck' id='coderdeck-style-example'>
<html>
<title>test</title>
<style>CODE</style>
<body>
</body>
</html>
</script>
<divid="presentation">
<!-- **************************************** -->
<!-- SLIDE: -->
<articleclass='slide slide-subhead'>
<h1>Going Beyond JavaScript Basics</h1>
<p>You're getting to be quite the pro!</p>
</article>
<!-- SLIDE: -->
<articleclass='slide slide-subhead'>
<h1>Debugging!</h1>
<p>Squash those crawly things in your code.</p>
</article>
<!-- SLIDE: -->
<articleclass='slide slide-list'>
<h2>What's a Bug?</h2>
<p>As <ahref="http://en.wikipedia.org/wiki/Grace_Hopper#Anecdotes" target="_blank">the story</a> goes, the term "software bug" got its name because a real moth flew into a computer system causing strange, unexpected behaviours to happen in a computer program. </p>
<p>Nowadays, bugs are mostly due to human error in one of two areas:</p>
<ol>
<li>
Syntax - missing semi-colons, typos, case-sensitivity</li>
<li>
Logic - trying to access a variable that doesn't exist yet, writing an incorrect conditional test</li></ol>
<p>Luckily there's a few things to help us hunt them down quicker...</p>
</article>
<!-- SLIDE: -->
<articleclass='slide slide-list'>
<h2>Chrome Developer Console</h2>
<p>Use the built in developer tools in Chrome to debug your code. (Firefox+Firebug is similar but not exactly the same.)</p>
<p>[Wrench Icon] > Tools > Developer Tools ( Alt+Cmd+L for Mac, Ctrl+L for Windows) Click on the Console tab.</p>
<p><imgsrc="assets/ChromeConsole.gif" width="632" height="84" alt="Chrome debugger tabs" /></p>
</article>
<!-- SLIDE: -->
<articleclass='slide slide-list'>
<h2>Right click > Inspect Element</h2>
<p>Easiest way to remember is to right-click on any web page and select "Inspect Element". In the new panel, select the "Console" tab to see JavaScript errors or to play in the console sandbox.</p>
<p><imgsrc="assets/ChromeInspector.gif" width="243" height="248" alt="Right click to see Inspect Element in the popup" /></p>
</article>
<!-- SLIDE: -->
<articleclass='slide slide-list'>
<h2>Inspecting the DOM</h2>
<p>You can inspect any webpage with the debugger. </p>
<p>Let's open up the Ladies Learning Code Events page: <ahref="http://ladieslearningcode.com/events/" target="_blank">http://ladieslearningcode.com/events/</a>.</p>
<p>How can we use the console to find out how many events are listed on this page?</p>
</article>
<!-- SLIDE: -->
<articleclass='slide slide-list'>
<h2>More info</h2>
<ul>
<li><ahref="https://developers.google.com/chrome-developer-tools/docs/overview" target="_blank">Chrome Developer Tools: Overview</a></li>
<li>Video: <ahref="http://www.youtube.com/watch?v=N8SS-rUEZPg" target="_blank">Google I/O 2011: Chrome Dev Tools Reloaded</a></li>
<li>Video: <ahref="https://www.youtube.com/watch?v=3pxf3Ju2row" target="_blank">Google I/O 2012 - Chrome Developer Tools Evolution</a></li>
</ul>
</article>
<!-- SLIDE: Next section -->
<!-- <article class='slide slide-list'>
<p class="centered vertically_centered"><a href="jquery-indepth.html"><img src="assets/next_section_icon.gif" width="230" height="70" alt="Click to go to next section" /></a></p>
</article> -->
</div>
<!-- END div id=presentation -->
<scriptsrc='src/jquery.min.js'></script>
<scriptsrc="src/modernizr.js"></script>
<!-- Update these paths to point to the correct files. -->
<scriptsrc="src/jquery.tmpl.min.js"></script>
<scriptsrc="src/deck.js/core/deck.core.js"></script>
<!-- Code Mirror -->
<scriptsrc="src/codemirror/lib/codemirror.js"></script>
<scriptsrc="src/codemirror/mode/xml/xml.js"></script>
<scriptsrc="src/codemirror/mode/css/css.js"></script>
<scriptsrc="src/codemirror/mode/javascript/javascript.js"></script>
<scriptsrc="src/codemirror/mode/htmlmixed/htmlmixed.js"></script>
<!-- Prettify -->
<scriptsrc="src/prettify.js"></script>
<!-- Deck Core and extensions -->
<scriptsrc="src/deck.js/extensions/status/deck.status.js"></script>
<scriptsrc="src/deck.js/extensions/navigation/deck.navigation.js"></script>
<scriptsrc='src/deck.coder.js'></script>
<scriptsrc="src/deck.js/extensions/hash/deck.hash.js"></script>
<scriptsrc="src/deck.js/extensions/menu/deck.menu.js"></script>
<script>
$(function(){
$.deck('.slide');
});
</script>
</body>
</html>