Chrome DevTools 101

22
Chrome DevTools by Juan Obando 0

Transcript of Chrome DevTools 101

Page 1: Chrome DevTools 101

ChromeDevTools

by Juan Obando

0

Page 2: Chrome DevTools 101

About meJuan ObandoSoftware Engineerfrom Universidaddel Valle

Page 3: Chrome DevTools 101

ExperiencePHP, RubyMySQL, PostgreSQLGitHTML, CSS, JavaScriptServer administration: Linux &Windows

Page 4: Chrome DevTools 101

Interests

Page 5: Chrome DevTools 101

https://github.com/juanchopx2/chrome-devtools-slides.git

Page 6: Chrome DevTools 101

AgendaBasic tips and tricksUsing the Console APINetwork timelineMobile emulationTerminal on DevTools

Page 7: Chrome DevTools 101

Basic tips andtricks

Page 8: Chrome DevTools 101

Use Chrome Canary!

Page 9: Chrome DevTools 101

Useful SettingsDisable cacheLog XMLHttpRequestsColor format as authoredEnable DevTools experiments: #enable-devtools-experiments

Page 10: Chrome DevTools 101

Ctrl (⌘ for Mac) + Shift + C to inspectDrag and drop elementsForce element state“Break on...” and breaking points

Page 11: Chrome DevTools 101

Using theConsole API

Page 12: Chrome DevTools 101

Writing to the console console.log("Nothing new so far! :@");

Warning and Errors console.warn("This might be new!");console.error("and maybe, this one too");

Grouping output console.group("Just reminding some tips about console");console.log("Nothing new so far! :@");console.warn("This might be new!");console.error("and maybe, this one too");console.groupEnd();

Page 13: Chrome DevTools 101

String substitution and formatting console.log("%s %i of times!", "Nothing new! Have seen this", 1000);

Styling console output with CSS console.log("%cStylish output", "color: #ff0000; font-size: 16px;");

Listing all element properties console.dir(document.body);

Page 14: Chrome DevTools 101

Measuring how long something takes console.time("Measuring");// your code hereconsole.timeEnd("Measuring");

Page 15: Chrome DevTools 101

Network timeline

Page 16: Chrome DevTools 101

Size/Content columnTime/Lantency columnInitiator columnHAR format: HTTP Archive Format

Page 17: Chrome DevTools 101

Mobile emulation

Page 18: Chrome DevTools 101

Terminal onDevTools

Page 19: Chrome DevTools 101

1. Install chrome extension2. Install 3. Install devtools-terminal package

4. Run devtools-terminal tool

Devtools Terminalnode.js

npm install -g devtools-terminal

Page 20: Chrome DevTools 101

Questions?

Page 21: Chrome DevTools 101

Thank you!

Page 22: Chrome DevTools 101