DevTools is your primary debugging instrument. Most engineers use 20% of it. This topic covers the Network, Performance, Memory, and Application panels at the depth that makes you dangerous in production performance investigations and memory leak hunts.
Chrome DevTools (and equivalents in Firefox, Safari, Edge) is divided into panels. Each panel surfaces a different view of what the browser is doing. Mastery means knowing which panel to open for which class of problem.
The live view of the DOM and computed styles. Changes here are not saved to source.
Inspect element: right-click โ Inspect, or Cmd+Shift+C to enter picker mode
Break on subtree modifications: right-click a node โ Break on โ Subtree modifications. Sets a DOM breakpoint, pauses JS execution when any descendant is mutated. Invaluable for finding "something is changing this DOM node and I don't know what."
Computed tab: shows final resolved styles (post-cascade, post-inheritance). When a style isn't applying, compare Styles (declared) vs Computed (resolved).
Accessibility panel: shows the accessibility tree as screen readers see it. Check role, name, and state for any interactive element.
Curated Video Reference
YouTube
Hand-picked video lecture to deepen your understanding of Browser DevTools Mastery
// Useful console APIs beyond console.log:console.table([{name: 'Alice', age: 30}, {name: 'Bob', age: 25}]); // formatted tableconsole.time('fetch'); fetch('/api'); console.timeEnd('fetch'); // timingconsole.group('Auth'); console.log('token set'); console.groupEnd(); // collapsible groupsconsole.trace(); // stack trace at call siteconsole.dir(element); // DOM element as JS object$0 // currently selected element in Elements panel$$('.btn') // querySelectorAll shorthand$_ // last evaluated expressioncopy(obj) // copies an object to clipboard (JSON)
Live expressions: click the eye icon โ type an expression โ it updates in real-time. Useful for watching window.scrollY or React state without adding console.logs.
Every HTTP request your page makes, with full timing breakdown.
Waterfall reading
The waterfall shows time on the horizontal axis, requests on vertical. Each row has colored segments:
Gray (Queuing): browser waiting to send (connection limit, prioritisation)
Gray (Stalled): connection establishment hasn't started
Green (DNS Lookup): resolving hostname to IP
Orange (Initial Connection): TCP handshake
Purple (SSL): TLS handshake
Green (TTFB): time from request sent to first response byte (server time + network)
Blue (Content Download): downloading the response body
A tall green TTFB bar means your server is slow, no amount of CDN helps with that.
Many gray/stalled bars means you're hitting the 6-connections-per-origin limit (HTTP/1.1) or the browser queue.
Key DevTools Network features
Filter bar Filter by type (XHR, JS, CSS, Doc), name, status, domainPreserve log Keep requests across page navigations (for debugging redirects)Disable cache Forces full cache bypass (simulates new user), only while DevTools is openThrottle Simulate 3G, offline, custom bandwidthBlock requests Block specific URLs or patterns (context menu โ Block request URL)Initiator Who triggered this request (JS stack trace, CSS import)Response headers Inspect Cache-Control, ETag, Content-Type for each responseCopy as cURL Copy a request as a curl command to replay in terminalReplay XHR Right-click a request โ Replay XHR (resend it)
The Memory panel finds memory leaks and identifies high-memory usage.
Heap snapshot
Captures the complete JS heap at a point in time. Shows every object, what's retaining it, and how much memory it uses.
Leak detection workflow:
Take snapshot 1 (baseline)
Perform the action you suspect causes a leak (navigate, open modal, run interval)
Force GC (trash can icon)
Take snapshot 2
Change "All objects" to "Objects allocated between Snapshot 1 and 2"
Sort by retained size, any unexpected objects here are your leak
Common leak sources in the heap snapshot:
Closures retaining large objects
Detached DOM nodes (removed from DOM but still referenced in JS)
Event listeners on removed elements
Global variables accumulating arrays
Detached DOM trees
Filter the heap snapshot for "Detached", these are DOM elements that were removed from the document but are still referenced by JS. Every detached element leaks its entire subtree.
// Common cause:const list = document.querySelector('.list');const handler = () => list.innerHTML; // list reference kept alivedocument.querySelector('.list').remove(); // removed from DOM// handler still holds reference โ list is detached, won't be GC'd
Allocation instrumentation
Records object allocations over time (not just a snapshot). Shows which JS functions are allocating the most memory. Good for finding allocation hot paths in animations or frequent re-renders.
Preserve log keeps requests from previous navigations. If you forget it's on, you see hundreds of stale requests and misattribute issues to the wrong page.
"Some script is making a mysterious network request", click the Initiator column. It shows the call stack that triggered the request. You'll find the exact line.