
A page looks spotless on your laptop, and five minutes after deployment someone messages you: the mobile menu won’t open, the submit button spins forever, or the pricing table overflows off the right side of the screen. The tempting reflex is to tweak a CSS rule or add a console.log, rebuild, and hope it goes away. Usually that just turns one bug into three guesses.
Browser DevTools already has most of the evidence sitting in front of you. You don’t need to memorize every tab—you just need a repeatable order of inspection so you stop guessing and let the DOM, network waterfall, and stack trace tell you what actually happened.
Reproduce One Symptom in a Clean State
“The site is broken” is impossible to debug. Narrow it down to a concrete action and expected outcome: “On /checkout, clicking Pay after selecting FPX leaves the button disabled and never redirects.”
Before chasing ghosts, open an Incognito/Private window (or a clean browser profile) to rule out ad blockers, password managers, or stale localStorage from an earlier build. Note whether the bug happens for guests, logged-in users, or only after a client-side navigation. Open DevTools with Cmd + Option + I on macOS (Ctrl + Shift + I on Windows/Linux) before you trigger the bug so it records from the start.
Read the First Console Error, Not the Last
Switch to the Console tab, hit the clear icon, and reproduce the action once.
Look at the first red error that appears at the moment of failure, not the cascade of ten warnings underneath it. An uncaught TypeError: Cannot read properties of undefined (reading 'items') often causes five downstream rendering errors; fixing the first one usually clears the rest. Click the linked file and line number—if source maps are enabled, Chrome will jump straight to your original TypeScript or JavaScript source rather than a minified bundle.
A handy trick when testing hypotheses in the Console: if you click an element in the Elements tab first, $0 in the Console refers directly to that DOM node. You can check $0.disabled or getComputedStyle($0).display in two seconds without writing temporary debug code. Just remember that anything you change in the browser disappears on reload—always bring the verified fix back to your source files.
Inspect the Live DOM and Computed Styles
Frameworks and CMS plugins routinely inject wrapper <div>s, toggle classes, or render different markup than what you wrote in a template. In the Elements panel, inspect the broken element and check three things:
- Is it actually in the DOM where you expect it?
- Are its attributes and text values right?
- Is an invisible overlay or sticky header sitting on top of it (
z-indexorpointer-events)?
In the Styles pane, crossed-out rules tell you a declaration lost to higher specificity or a later stylesheet. If you are tired of scrolling through twenty inherited rules to find out why padding or font size looks wrong, switch to the Computed tab—it shows the final resolved pixel values and links directly to the exact rule that won.
You can toggle properties live (for example, unchecking overflow: hidden on a parent container to see if it is clipping a dropdown), and use Device Mode to test narrow 360px phone widths. Just don’t trust Device Mode alone for touch scrolling, iOS Safari viewport height (100dvh), or font rendering—verify final layout fixes on a real phone.
Trace Requests in the Network Panel
When a form hangs, data comes back empty, or an image vanishes, open Network and enable two checkboxes right at the top: Preserve log and Disable cache. Preserve log is essential whenever a form submit triggers a redirect or page reload—without it, Chrome wipes the request list the instant the page navigates, hiding the exact 400 or 500 response you needed to see.
Filter by Fetch/XHR for API calls, or use filter syntax like status-code:500 or method:POST. Inspect the failing request’s Headers, Payload, and Response tabs:
404usually means a wrong base path, missing asset after deploy, or case-sensitive filename mismatch on Linux.401/403points to missing auth cookies, expired CSRF tokens, or a WAF/Cloudflare rule blocking the payload.500means the backend crashed—check your server logs alongside the response body.- A CORS error in the Console paired with a failed
OPTIONSpreflight in Network means the server’sAccess-Control-Allow-*headers do not match the frontend origin.
If you need to hand a failing API call to a backend colleague—or replay it in your terminal—right-click the request and choose Copy → Copy as cURL. Before pasting any HAR export or screenshot into a ticket, scrub Authorization headers, session cookies, and customer PII.
Throttle CPU and Network to Catch “Works on My Laptop” Bugs
A site that feels snappy on an Apple Silicon MacBook over fibre can choke on a mid-range Android phone over congested 4G. In the Performance panel (or Network tab), test with Slow 4G and 4x CPU slowdown enabled, then record a short 5-second interaction like opening a filter drawer or typing into a search box.
Look for long yellow scripting blocks (>50ms tasks) or forced synchronous layouts (“Layout Shift” / purple layout bars firing repeatedly inside a scroll or resize handler). Often a button feels “broken” simply because the main thread is locked up for two seconds parsing heavy JavaScript or re-rendering a giant list.
Step Through Logic with Breakpoints
When there are no red errors and every network request returns 200 OK, yet the UI still shows the wrong state, stop guessing and set a breakpoint. In the Sources panel, open the file (or use Cmd + P / Ctrl + P to jump by filename) and click a line number inside the click handler.
Even better for mystery bugs: in Elements, right-click a node that keeps changing unexpectedly and choose Break on → attribute modifications (or subtree modifications). The next time any script adds a class or hides that element, DevTools pauses execution right on the offending line of code—even if it came from a third-party widget you forgot was loaded.
For more on keeping the rest of your web workflow predictable, these guides pair well with a DevTools habit:
- Your Website Works for You—But Can Everyone Use It? A Practical Accessibility Checklist
- PHP2Shell Explained: What the New PHP Vulnerability Means for Ordinary Website Owners
- Moving a Website Without Losing Visitors: A Safer Migration Guide
DevTools works best when it keeps you honest. Reproduce one symptom in a clean window, check the first Console error, verify the live DOM, trace the Network request with Preserve log on, and let breakpoints show you the exact line where reality diverged from what you assumed.