Chrome devtools
Chrome devtools
Win: F12, Ctrl + Shift + i
Mac: Cmd + Opt + i
Right Click: Inspect Element
Chrome devtools: Overall anatomy: panels
Chrome devtools: Overall anatomy: panels
Chrome devtools: Overall anatomy: panels
Chrome devtools: Overall anatomy: panels
Chrome devtools: Overall anatomy: panels
Chrome devtools: Overall anatomy: panels
Chrome devtools: Overall anatomy: panels
Chrome devtools: Overall anatomy: panels
1
2
3
4
Chrome devtools: Overall anatomy: panels
$(css_selector) | gives first match (!= JQuery) |
$$(css-selector) | gives all matches |
$x(xpath) | gives all matches |
$_ | last output |
$0 ... $4 | last five used elements |
copy(object) | copies object to clipboard |
dir(object) | directory style listing (good for Dom) |
inspect(object) | opens Element panel with object selected |
getEventListeners(object) | shows all event listeners on the object |
keys(object) | lists names of properties |
monitor(function) | logs on console when function is called |
monitorEvents(object, events) | logs Event object when event occurs on the object |
table(data) | Log object data with table formatting |
values(object) | array containing the values of all properties |
Ref: https://developers.google.com/web/tools/chrome-devtools/debug/command-line/command-line-reference?hl=en
Chrome devtools: Overall anatomy: panels
var names = {
0: { nick: "Ji", person: "Praveen" },
1: { nick: "Jeev", person: "J.P Robinson" } };
table(names);
monitorEvents(window, "resize");
function foo() { return "foo";}
monitor(foo);
getEventListeners(document);
document.body;
dir(document.body);
copy(names);
$('img');
$$('img');
$_
$0
$1
$2
$3
$4
i=$('img');
inspect(i);
Chrome devtools: Overall anatomy: panels
Chrome devtools: Overall anatomy: panels
Chrome devtools: Overall anatomy: panels
Chrome devtools: Overall anatomy: panels
Chrome devtools: Overall anatomy: panels
Chrome devtools
Chrome devtools: Network panel
Chrome devtools: Network panel
Disable the cache
Show Overview
Use small request rows
Capture screenshots
Chrome devtools: Network panel
Add Domain column (right click here to add get the menu)
Chrome devtools: Network panel: sample: wtca-staging
Chrome devtools: Network panel: sample: menu.beerboard
Chrome devtools: Network panel
Chrome devtools: Network panel: Things to notice
DOMContentLoaded
DOMContentLoaded
Load
Load
Total requests
Chrome devtools: Network panel: Things to notice
Zoomed in
The 'gap'
Sizes and Times
Chrome devtools: Network panel
Chrome devtools: Network panel
Chrome devtools: Network panel
Chrome devtools: Network panel
Chrome devtools: Network panel
Stalled/Queued
Content download
TTFB
Gaps
Chrome devtools: Network panel
More green: Slow network or slow serverside
Chrome devtools: Network panel
More blue: Heavy resource
Chrome devtools: Network panel: Tips and Limitations
Chrome devtools: Network panel
Chrome devtools
Thanks
Not covered here: