Get more out of Chrome DevTools.
From simple live page CSS alterations and JavaScript logging, to device emulation and performance profiling, understanding Chrome's Dev Tools has become an indispensable skill for front-end coders.
This was a talk delivered on March 26 at Shutterstock's Empire State Building offices for the New York Front End Coders meetup. It covered a wide variety of tips and tricks that developers of all skill levels could use.
Adam Bankin is a front-end engineer at Shutterstock's NY office. His days are spent happily modernizing and re-architecting the codebase to make things go zoom.
14. Debugger keyword
var body = document.body;
function doStuff (obj) {
var win = window;
var value = 9;
debugger;
}
function callDoStuff () {
doStuff({a: 1, b: 2, c: 3});
}
callDoStuff();
21. Editable code
// Literals don't seem to work
doStuff({a: 1, b: 2, c: 3}); // talk1.js
// predefined values DO
var obj = {a: 1, b: 2, c: 3}; // talk2.js
doStuff(obj);
22. (Mac) Keyboard shortcuts
(Cmd + Option + i) Open DevTools
(ESC) Open and close the console drawer
(Shift + return) Enter a line return in the console
(fn + F8) Step over
(fn + F11) Step into
(Shift + fn + F11) Step out
(Cmd + [ or ]) Navigate between tabs