- Elements tab
- Console and logging
- Sources tab
- Network tab
- Commands
- Misc
- Change types: subtree change, attribute change, node removal
- Elements tab > right click on node > Break on > [change type]
- For inspecting "tricky-to-catch elements" (e.g. when it appears periodically or randomly)
- Go to Sources tab > wait/prepare UI > press F8
- use
console.log({variable})
instead ofconsole.log(variable)
- start a "timer" width
console.time(label)
and when you runconsole.timeEnd(label)
it will print how much time has passed
$(selector)
isdocument.querySelector(selector)
$$(selector)
is$$querySelector(selector)
- PLUS the latter gives back a true array and not an array-like object (so you can easily use map and filter)
- Select a node in the Elements tab > Switch to the console tag and the
$0
variable holds the selected element $1
,$2
, etc also work for previous elements
- the
copy()
function copies its parameter to the clipboard
$_
holds the value of the most recently evaluated expression
- Console tab > declare variable
let a = 1
> declare variable againlet a = 2
> no error (doesn't work with const)
document.designMode = 'on'
- Bottom left of source >
{ }
- Under the play/pause/skip button row > "Watch" tab > press the plus icon to add a variabla/expression
- Under "Watch" tab > "Event breakpoints"
- Any tab > Cmd+Option+f
- Right click on request > Block request URL
- as cURL, as fetch, response, ...
- Right click on request > copy > [what to copy]
- Undock the devtools panel > press Cmd+Shift+i
- Couple presets for a mix of both at the top, next to the zoom
- You can set it individually
- for the network in the Network tab right to the disable cache checkmark
- for the cpu in the Performance tab > click the gear icon > dropdown with "CPU" label
Open the command modal with Cmd+shift+p.
- Types: node, area, full
- Type in "screenshot" to see all screenshot command
- [Rendering] Show frames per second (FPS) meter