debugging javascript by dipil singh saud

19
DEBUGGING JAVASCRIPT WITH CHROME DEVTOOLS Created by / Dipil Singh Saud @dipilsaud

Upload: dipil-saud

Post on 16-Aug-2015

155 views

Category:

Software


3 download

TRANSCRIPT

Page 1: Debugging javascript   by dipil singh saud

DEBUGGING JAVASCRIPTWITH CHROME DEVTOOLS

Created by / Dipil Singh Saud @dipilsaud

Page 2: Debugging javascript   by dipil singh saud

HEADS UP1. Devtools UI2. Know the Console3. Debugging4. Share / Questions

Page 3: Debugging javascript   by dipil singh saud

DEVTOOLSCMD + SHIFT + I

Panels

Settings

Page 4: Debugging javascript   by dipil singh saud

THE CONSOLETips and Tricks

to give you the kicks

Page 5: Debugging javascript   by dipil singh saud

CONSOLE.LOG() WITH A TWISTconsole.log("%cBIG RED MESSAGE", "font-size: 200%;

background-color: #C0FFEE;")

console.log(arg1, arg2, arg3)

Page 6: Debugging javascript   by dipil singh saud

CONSOLE.DIR()

Page 7: Debugging javascript   by dipil singh saud

ELEMENTS/CONSOLE$0..$4 OR $n(x)

inspect(element)

Page 8: Debugging javascript   by dipil singh saud

CONSOLE.TABLE(ELEMENTS, FIELDS)

Page 9: Debugging javascript   by dipil singh saud

COPY()

Page 10: Debugging javascript   by dipil singh saud

Filters

Preserve Log

Scoping into Frames

Store as Global Variable

Page 11: Debugging javascript   by dipil singh saud

FIREBUG APIhttps://getfirebug.com/wiki/index.php/Command_Line_API

Page 12: Debugging javascript   by dipil singh saud

DEBUGGING

Page 13: Debugging javascript   by dipil singh saud

SETTING BREAKPOINTSStep Over / Step Into / Step Out

Scope Variables

Watch Expressions

Async

Page 14: Debugging javascript   by dipil singh saud

BREAKPOINTS ON XHR

Page 15: Debugging javascript   by dipil singh saud

DEBUG FROM UIBreak on Subtree Modification

Break on Event

Page 16: Debugging javascript   by dipil singh saud

TIMELINE TO DEBUG

Page 18: Debugging javascript   by dipil singh saud

HAVE A QUESTION?OR

SHARE YOUR PIECE

Page 19: Debugging javascript   by dipil singh saud

THANK YOU FOR YOURPATIENCE