Chrome Devtools Cheatsheet PDF
Chrome Devtools Cheatsheet PDF
Opening Devtools
To access the DevTools, on any web page or app in Google Chrome you can use one of these options:
Open the Chrome menu at the top-right of your browser window, then select Tools > Developer
Tools.
Right-click on any page element and select Inspect Element.
Open / switch from inspect element mode and browser window Ctrl + Shift + C Cmd + Shift + C
Open Developer Tools and bring focus to the console Ctrl + Shift + J Cmd + Opt + J
Inspect the Inspector (undock first one and press) Ctrl + Shift + J Cmd + Opt + J
To open up the General Settings dialog type ? or F1 when the Developer Tools window is open. Press Esc to
close the settings dialog.
All Panels
Windows / Linux Mac
Jump to panel 1-9 (when enabled in General Ctrl + 1-9 Cmd + 1-9
Settings)
Refresh the page ignoring cached content Ctrl + F5, Ctrl + Shift + R Cmd + Shift + R
http://anti-code.com/devtools-cheatsheet/ 1/13
11/5/2018 Chrome Devtools Cheatsheet
Elements Panel
Windows / Linux Mac
Undo change Ctrl + Z Cmd + Z
Hide element H H
http://anti-code.com/devtools-cheatsheet/ 2/13
11/5/2018 Chrome Devtools Cheatsheet
Styles Sidebar
Windows / Linux Mac
Edit rule Single-click Single-click
Go to line of style rule property declaration Ctrl + Click on property Cmd + Click on property
in source
Go to line of property value declaration in Ctrl + Click on property Cmd + Click on property
source value value
Go to line of style rule property declaration Ctrl + Click on property Cmd + Click on property
in source
Go to line of property value declaration in Ctrl + Click on property Cmd + Click on property
source value value
Cycle through the color definition value Shift + Click on color Shift + Click on color
picker box picker box
Edit next / previous property Tab, Shift + Tab Tab, Shift + Tab
Increment / decrement value by 10 Shift + Up, Shift + Down Shift + Up, Shift + Down
Increment / decrement value by 100 Shift + PgUp, Shift + Shift + PgUp, Shift +
PgDown PgDown
Increment / decrement value by 0.1 Alt + Up, Alt + Down Opt + Up, Opt + Down
http://anti-code.com/devtools-cheatsheet/ 3/13
11/5/2018 Chrome Devtools Cheatsheet
Network Panel
http://anti-code.com/devtools-cheatsheet/ 4/13
11/5/2018 Chrome Devtools Cheatsheet
Sources Panel
Windows / Linux Mac
Step over next function call F10, Ctrl + ' F10, Cmd + '
Step out of current function Shift + F11, Ctrl + Shift + Shift + F11, Cmd + Shift +
; ;
Toggle breakpoint condition Click on line number, Ctrl Click on line number, Cmd
+B +B
Toggle console and evaluate code selected Ctrl + Shift + E Cmd + Shift + E
in Sources panel
Exceptions (http://goo.gl/dZSwr)
Timeline Panel
Windows / Linux Mac
http://anti-code.com/devtools-cheatsheet/ 5/13
11/5/2018 Chrome Devtools Cheatsheet
Profiles Panel
Windows / Linux Mac
Start / stop recording Ctrl + E Cmd + E
Profiling types:
CPU profiler (http://goo.gl/igHcw): shows where execution time is spent in your page's JavaScript
functions
Heap profiler (http://goo.gl/9mBFW): shows memory distribution by your page's JavaScript objects
and related DOM nodes
Search Shortcuts
Find or navigate to specific files, methods or line numbers in an web app within the Sources panel
Filter/navigate to a JavaScript function/CSS rule when viewing a file Ctrl + Shift + O ⌘ + SHift + O
Console
Windows / Linux Mac
Right-clicking on console:
http://anti-code.com/devtools-cheatsheet/ 6/13
11/5/2018 Chrome Devtools Cheatsheet
Screencasting
Windows / Linux Mac
Pinch zoom in Alt + Scroll,Ctrl + Cick and drag with Opt + Scroll, Cmd + Cick and drag with
and out two fingers two fingers
Emulation
Windows / Linux Mac
Pinch zoom in and out Shift + Scroll Shift + Scroll
Console API
Command Description
console.assert(expression[, Tests that an expression is true. If not, it will write a message to the
object, ...]) console and throw an exception.
console.constructor()
console.count([title]) Writes the number of times that the line of code where count was
called was executed. The optional argument title will print a message
in addition to the number of the count.
console.debug(object[, object, Writes a message to the console, including a hyperlink to the line
...]) where it was called.
console.dir(object) Prints an interactive listing of all properties of the object. This looks
identical to the view that you would see in the DOM tab.
console.dirxml(node) Prints the XML source tree of an HTML or XML element. This looks
identical to the view that you would see in the HTML tab. You can
click on any node to inspect it in the HTML tab.
console.error(object[, object, Writes a message to the console with the visual "error" icon and color
...]) coding and a hyperlink to the line where it was called.
console.group(object[, object, Writes a message to the console and opens a nested block to indent
...]) all future messages sent to the console. Call console.groupEnd() to
close the block.
console.hasOwnProperty()
console.info(object[, object, ...]) Writes a message to the console with the visual "info" icon and color
coding and a hyperlink to the line where it was called.
http://anti-code.com/devtools-cheatsheet/
console.isPrototypeOf() 7/13
yp ()
11/5/2018 Chrome Devtools Cheatsheet
console.keys() Gives you the names of all the elements of an object.
console.log(object[, object, ...]) Writes a message to the console. You may pass as many arguments
as you'd like, and they will be joined together in a space-delimited
line. You can use printf-like string substitution patterns as well which
are:
String: %s - console.log('The %s is a
%s', animal, cat);
Integer: %d, %i - console.log('Number %d
plus %i', 1, 2); *integer not yet
supported
Floating point number: %f -
console.log('Floating points: %f',
1.5); *numeric formatting not yet supported
Hyperlink: %o - console.log('Live laugh
code at $o', 'http://anti-code.com'
);
Style formatting: %c - console.log('%c
This is white text on a black
background',
'color:#fff;background:#000;');
console.profile([title]) Turns on the JavaScript profiler. The optional argument title would
contain the text to be printed in the header of the profile report.
console.profileEnd() Turns off the JavaScript profiler and prints its report.
console.profiles An array of profile objects that summarizes the data from profile().
console.propertyIsEnumerable()
console.table(data[, columns]) Allows to log provided data using tabular layout. The method takes
one required parameter that represents table like data (array of
arrays or list of objects).
console.timeStamp()
console.toLocaleString()
console.toString()
console.warn(object[, object, Writes a message to the console with the visual "warning" icon and
...]) color coding and a hyperlink to the line where it was called.
console.valueOf()
window.onerror When exceptions are thrown in the window context and is not caught
by any try/catch block, the function will be invoked with the
http://anti-code.com/devtools-cheatsheet/ exception's message, the URL of the file where the exception was 8/13
th d th li b i th t fil d th t i
11/5/2018 thrown and the line number
Chrome DevtoolsinCheatsheet
that file passed as three arguments in
that order.
window.onerror = function(msg, url, line) {
console.log('message: ' + msg, 'url: ' + url, 'line: ' +
line); };
dir(object) Prints an interactive listing of all properties of the object. This looks identical
to the view that you would see in the DOM tab.
dirxml(node) Prints the XML source tree of an HTML or XML element. This looks identical
to the view that you would see in the HTML tab. You can click on any node to
inspect it in the HTML tab.
inspect(object[, Inspects an object in the most suitable tab, or the tab identified by the
tabName]) optional argument tabName.
keys(object) Returns an array containing the names of all properties of the object.
values(object) Returns an array containing the values of all properties of the object.
monitorEvents(object[, Turns on logging for all events dispatched to an object. The optional
types]) argument types may specify a specific family of events to log. The most
commonly used values for types are "mouse" and "key". The full list of
available types includes "composition", "contextmenu", "drag", "focus",
"form", "key", "load", "mouse", "mutation", "paint", "scroll", "text", "ui", and
"xul".
performance
performance.timing
performance.memory
performance.navigation
profile([title]) Turns on the JavaScript profiler. The optional argument title would contain
the text to be printed in the header of the profile report.
profileEnd() Turns off the JavaScript profiler and prints its report.
http://anti-code.com/devtools-cheatsheet/ 9/13
11/5/2018 Chrome Devtools Cheatsheet
Flags
Feature Description
-disable-javascript Disable JavaScript from command line.
DevTools Themes
MNML Theme (http://goo.gl/NNzwh)
Monokai Dark (http://goo.gl/KgNfU)
Tomorrow Theme (http://goo.gl/tcELr)
IR_Black Theme (http://goo.gl/Ou6WA)
IR_Black Theme with sidebar colors (http://goo.gl/5ddPs)
Solarized Dark (http://goo.gl/W0INT)
Ruby Blue (http://goo.gl/MxIjz)
Expresso (http://goo.gl/zK2Sn)
Inversion (http://goo.gl/T1SeZ)
Dark Theme (http://goo.gl/viN4b)
Dark Dev (http://goo.gl/BVIDe)
WebLight Theme (http://goo.gl/E5NJh)
Tweak your skin for the DevTools using the DevTools themselves by undocking them then hitting Ctrl + Alt
+ I or ⌃ + Alt + I on Mac.
Override the classes/IDs of Devtools for your theme via:
http://anti-code.com/devtools-cheatsheet/ 10/13
11/5/2018 Chrome Devtools Cheatsheet
Other Chrome Shortcuts
Here are some additional Chrome shortcuts which are useful for general use within the browser not specific to
the DevTools. View all Chrome shortcuts (http://goo.gl/PsTNm) for Windows, Mac, and Linux.
Previous page in a tabs browsing history Backspace, Alt + Left Backspace, Alt + Left
Highlight content in the web address area F6, Ctrl + L, Alt + D Cmd + L, Alt + D
Places a ? in the address bar for performing a keyword Ctrl + K, Ctrl + E Cmd + K, Cmd + E
search using your default search engine
For a list of all Chrome shortcuts for Windows, Mac, and Linux check out http://goo.gl/PsTNm
(http://goo.gl/PsTNm)
about:pages
Page Description
about:about Displays all the chrome://chrome-urls
http://anti-code.com/devtools-cheatsheet/ 11/13
11/5/2018 Chrome Devtools Cheatsheet
Chrome URLs
chrome://chrome-urls == about:about
chrome://appcache-internals
chrome://blob-internals
chrome://bookmarks
chrome://cache
chrome://crashes
chrome://credits
chrome://dns
chrome://downloads
chrome://extensions
chrome://flags
chrome://flash
chrome://gpu-internals
chrome://histograms
chrome://history
chrome://ipc
chrome://media-internals
chrome://memory
chrome://net-internals
chrome://view-http-cache
chrome://newtab
chrome://plugins
chrome://print
chrome://quota-internals
chrome://sessions
chrome://starts
chrome://sync-internals
chrome://tcmalloc
chrome://terms
chrome://tracing
chrome://version
chrome://workers
chrome://conflicts
For Debugging
The following pages are for debugging purposes only. Because they crash or hang the renderer, they're not
linked directly; you can type them into the address bar if you need them
chrome://crash
chrome://kill
chrome://hang
chrome://shorthang
chrome://gpuclean
chrome://gpucrash
chrome://gpuhang
http://anti-code.com/devtools-cheatsheet/ 12/13
11/5/2018 Chrome Devtools Cheatsheet
Devtools Links
This work is licensed under a Creative Commons Attribution 3.0 Unported License
(http://creativecommons.org/licenses/by/3.0/).
Cheatsheet by Jared Williams (http://anti-code.com). Notify me if you find something that is incorrect.
Contribute to Cheatsheet (https://github.com/jaredwilli/devtools-cheatsheet) | Contribute to Devtools
(https://developers.google.com/chrome-developer-tools/docs/contributing)
http://anti-code.com/devtools-cheatsheet/ 13/13