Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save KevinTCoughlin/6b71e1d6546209d1e8f54a98edd0a283 to your computer and use it in GitHub Desktop.
Save KevinTCoughlin/6b71e1d6546209d1e8f54a98edd0a283 to your computer and use it in GitHub Desktop.
Chrome DevTools Console Cheatsheet

$_ returns the value of the most recently evaluated expression. $0-4 - Last five DOM elements inspected or last five JS heap objects $(selector) alias for document.querySelector() $$(selector) alias for document.querySelectorAll() $x(path) array of DOM elements that match the XPath expression (e.g "//p[a]") clear() copy(object) debug(function) // debugger invoked and breaks inside the function dir(object) object-style listing of all specified objects properties, alias for console.dir() getEventListeners(object) inspect(object/function) keys(object) monitor(function) monitorEvents(object[, events]) profile() / profileEnd() table(data, [columns]) values();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment