10 Chrome DevTools Tricks Every Web Developer Should Know in 2025
09/07/2025
This step-by-step guide walks you through setting up ESLint for linting, Prettier for formatting, and Husky for Git hooks. Ensure clean, consistent code and prevent bad commits by automating checks in your JavaScript, TypeScript, or React development workflow.
10 Chrome DevTools Tricks Every Web Dev Should Know
Unlock the hidden power of your browser's best friend!
Google Chrome's DevTools are arguably the most powerful set of utilities available to web developers. While most of us are familiar with the "Elements" and "Console" tabs, DevTools is packed with features that can dramatically streamline your debugging, profiling, and design workflow. Mastering these tools can save you hours of frustration and make you a more efficient developer.
Ready to level up your DevTools game? Here are 10 essential tricks that every web developer should have in their arsenal.
The Tricks You Need to Know
1. Command Menu: The Ultimate Shortcut (Ctrl+Shift+P / Cmd+Shift+P)
If you learn only one trick, make it this one. The Command Menu provides quick access to almost every DevTools panel, setting, and action without clicking through menus. Just type what you're looking for!
How to use:
- Open DevTools (F12 or Ctrl+Shift+I / Cmd+Opt+I).
- Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac).
- Start typing (e.g., "screenshot", "layout", "drawer") to filter commands.
2. $0 - $4: Quickly Reference Selected Elements
When inspecting elements in the "Elements" panel, you can quickly reference the currently selected element (and the last four previously selected) in the "Console" using special variables.
How to use:
- Go to the "Elements" panel and select an HTML element.
- Switch to the "Console" panel.
- Type $0 and press Enter to get a reference to the currently selected element.
- Use $1, $2, $3, $4 for the four previously selected elements.
3. Preserve Log: Keep Console Logs Across Page Navigations
Debugging issues that involve page reloads or navigations can be tricky when your console logs disappear. "Preserve log" prevents the console from clearing on navigation.
How to use:
- Go to the "Console" panel.
- Click the Settings gear icon (⚙️) or the "Console settings" icon (next to "Clear console" button).
- Check the "Preserve log" checkbox.
4. Simulate Mobile Devices with Device Mode
Test your responsive designs and mobile-specific features directly within DevTools, complete with device specific viewports, pixel ratios, and even touch simulation.
How to use:
- Click the "Toggle device toolbar" icon (📱) in the top-left of DevTools, or press Ctrl+Shift+M (Cmd+Shift+M).
- Select a device from the dropdown, or enter custom dimensions.
- You can also simulate network conditions, user agents, and more.
5. Local Overrides: Experiment with Changes Without Touching Source Code
Want to test a CSS change, a JS fix, or modify HTML on a live site without changing the actual source files? Local Overrides let you save changes made in DevTools to your local filesystem.
How to use:
- Go to the "Sources" panel.
- In the left sidebar, select the "Overrides" tab.
- Click "+ Select folder for overrides" and choose an empty local folder. Grant permissions.
- Now, when you make changes to CSS/JS in the "Elements" or "Sources" panel, right-click the file name and select "Save for overrides". Your changes will persist even after refresh!
6. Get a Full-Page Screenshot
Need a screenshot of an entire web page, including the parts that are off-screen? DevTools can do this natively, saving you from browser extensions.
How to use:
- Open DevTools.
- Open the Command Menu (Ctrl+Shift+P / Cmd+Shift+P).
- Type "screenshot" and select "Capture full size screenshot".
7. Network Throttling: Simulate Slow Connections
Optimize for real-world user experiences by testing how your site performs on slow network conditions. DevTools makes this easy.
How to use:
- Go to the "Network" panel.
- Look for the "Throttling" dropdown (often set to "No throttling" by default).
- Select a preset (e.g., "Fast 3G", "Slow 3G") or create a custom profile.
8. Event Listener Breakpoints: Debug Interactions
Troubleshooting why a click or scroll event isn't firing correctly? Set breakpoints on specific event listeners to pause execution when the event occurs.
How to use:
- Go to the "Sources" panel.
- In the right sidebar, expand the "Event Listener Breakpoints" section.
- Check the box next to the event type you want to debug (e.g., "click", "scroll").
- Now, when that event fires, the debugger will pause, allowing you to inspect the call stack.
9. Dark Mode Simulation: Test Your Themes
Quickly toggle between light and dark mode simulations to ensure your site's themes look good across different user preferences.
How to use:
- Open DevTools.
- Open the Command Menu (Ctrl+Shift+P / Cmd+Shift+P).
- Type "render" and select "Show Rendering".
- In the Rendering tab that appears, find the "Emulate CSS media feature prefers-color-scheme" dropdown and choose "dark" or "light".
10. Console Logging with Styles and Tables
Beyond simple `console.log()`, you can make your console output much more readable and informative using CSS styles and `console.table()`.
How to use:
- Styled Logs: Use `%c` for styling:
console.log('%cHello, %cWorld!', 'color: blue; font-size: 20px;', 'color: red; font-weight: bold;');
- Table Logs: Display array of objects or objects as a table:
const users = [{ name: 'Alice', age: 30 }, { name: 'Bob', age: 24 }]; console.table(users);