</>StackKit
</>StackKit

Developer tutorials & guides

Chrome DevTools open in browser
DevTools

Browser DevTools: 12 Tricks Most Developers Don't Know

Level up your debugging with advanced Chrome DevTools techniques: console tricks, network throttling, CSS editing, performance profiling, and more.

A
Alex Carter
March 9, 20257 min read
#devtools#chrome#debugging#performance#css

DevTools Is a Whole IDE

Most developers use maybe 10% of DevTools. The Elements panel, the Console, Network tab — and stop there. But DevTools is a comprehensive debugging and profiling suite that can save hours every week. Here are 12 techniques that most developers have never used.


1. Console: More Than console.log

// Format objects in tables
console.table(users);

// Group related logs
console.group('Auth Flow');
console.log('Token validated');
console.log('User fetched');
console.groupEnd();

// Measure time
console.time('api-call');
await fetchUser(id);
console.timeEnd('api-call'); // "api-call: 243ms"

// Assert conditions
console.assert(price > 0, 'Price must be positive', { price });

// Log with color
console.log('%cImportant!', 'color: red; font-weight: bold', data);

2. Live CSS Editing

In the Elements panel, click any CSS value to edit it live. Changes reflect immediately. You can:

  • Double-click a hex color to open the color picker
  • Click-drag on a number to increment/decrement it
  • Use Shift+Click on a color swatch to cycle color formats (hex/rgb/hsl)

3. Force Element States

In Elements → Styles, click the :hov button to force :hover, :focus, :active, and :visited states. Inspect hover styles without having to hover — life-changing for debugging hover effects.


4. Network Request Replay

Right-click any network request → "Copy as fetch" or "Copy as cURL". Paste into your console or terminal to replay it exactly.

Also: right-click → "Block request URL" to simulate a failed API call.


5. Network Throttling

In the Network tab, click "No throttling" → choose a preset like "Slow 3G" or create a custom profile. Test your loading states and skeleton screens on real-world connections.


6. Debugger: Conditional Breakpoints

Instead of adding if (userId === 42) debugger to your code, right-click any breakpoint in Sources → "Edit breakpoint" → add a condition. The debugger only pauses when the condition is true.


7. Step Into Async Code

In the Sources panel, enable "Async Stack Traces" (on by default in modern Chrome). When you're paused in an async callback, the call stack shows the entire chain — including where the Promise was created.


8. Performance Panel: Find What's Slow

  1. Open Performance tab
  2. Click Record
  3. Interact with the slow part of your app
  4. Stop recording
  5. Look for long tasks (red triangles), forced reflows (purple), and large paint events

The flame chart shows exactly which functions ran and for how long.


9. Memory Panel: Find Memory Leaks

  1. Take a heap snapshot
  2. Interact with your app (navigate around, open/close dialogs)
  3. Take another snapshot
  4. Use "Comparison" view to see what objects were allocated and not garbage collected

Common leaks: event listeners not removed, global arrays that grow unbounded, closures holding large objects.


10. Lighthouse Audits Built In

Lighthouse → Analyze Page Load. Gives you Performance, Accessibility, Best Practices, SEO scores with specific improvement recommendations.

Run it after every significant change to catch regressions.


11. Override Files Locally

Sources → Overrides → Enable local overrides. You can edit a production site's JavaScript or CSS locally, save it, and the browser uses your version on refresh. Incredible for debugging production issues without deploying.


12. Command Menu

Cmd+Shift+P in DevTools (yes, just like VS Code) — search for any DevTools feature. Some gems:

  • "Show FPS meter" — real-time frame rate overlay
  • "Capture full size screenshot" — screenshot the entire page
  • "Disable JavaScript" — test your no-JS fallbacks
  • "Emulate CSS media feature" — test print styles, prefers-color-scheme

Conclusion

DevTools rewards investment. Pick two of these you haven't used before and practice them deliberately for a week. Once conditional breakpoints and the performance flame chart become muscle memory, you'll debug and optimize at a fundamentally different speed.

#devtools#chrome#debugging#performance#css