Mastering Chrome DevTools: Debugging Techniques That Save Hours of Development Time
A practical tour of the Chrome DevTools features that replace scattered console.log calls. You use live expressions and console.table() in the Console, logpoints and conditional breakpoints in Sources, throttling, request blocking and edit-and-resend in Network, local overrides to test a fix on a live site, snippets, and the Performance panel's forced reflow insight.

When a bug shows up, the usual reflex is to sprinkle console.log('here') through the code and reload twenty times. It works, slowly, and the stray logs often end up committed. This guide is for frontend developers who know the Elements and Console panels and want to find bugs faster. It covers the Chrome DevTools features that replace most of those log lines: logging without editing code, pausing only when it matters, faking bad networks and testing a fix on a live site.
This is part 24 of the Frontend & JavaScript Fundamentals series. It follows automated testing with Jest and React Testing Library. Tests tell you that something broke. DevTools helps you find where.
Key takeaways
- Logpoints and conditional breakpoints let you log or pause at any line without editing the source file.
- The Network panel can slow, block and resend requests, so you can test failure paths on demand.
- Local overrides serve your edited copy of a file instead of the server's, so you can try a fix on a live page before you deploy it.
1. The Console: beyond console.log
Chrome DevTools is the set of debugging tools built into Chrome, with panels for inspecting the DOM, running JavaScript, stepping through code, watching network traffic and profiling performance. The Console is where most people start.
Live expressions
Stop typing the same variable name into the Console again and again. Click Create live expression (the eye icon) at the top of the Console and type an expression, such as document.activeElement. The Chrome docs say the value updates every 250 milliseconds, so you can watch it change as you click and tab around the page.
console.table()
API responses are often arrays of objects. With console.log, you expand each object by hand. The Console API reference describes console.table() as logging an array of objects as a table:
const users = [
{ id: 1, name: 'Asha', role: 'Admin' },
{ id: 2, name: 'Sarah', role: 'Editor' },
{ id: 3, name: 'Bot', role: 'Crawler' },
];
// Shows one row per object, one column per property
console.table(users);
The same call works in Node.js 22, which prints the table as text.
Logpoints: logging without editing the file
How often has a stray console.log reached production? Logpoints avoid that.
- Open the Sources panel and the file you want.
- Right-click the line number.
- Select Add logpoint.
- Enter what to log, using the same syntax as a
console.log()call, and press Enter.
For example, this logpoint message logs a label and a value:
'User ID:', user.id
DevTools logs the message every time that line runs, without pausing and without changing the file on disk. Your Git diff stays clean.
2. Breakpoints that pause only when needed
A debugger; statement or a plain breakpoint stops every time. In a loop, that means clicking Resume again and again. The Chrome breakpoints guide lists several more targeted types.
Conditional breakpoints
Say you loop over 1,000 items, but the bug only happens for the item with id 845. Right-click the line number, select Add conditional breakpoint, enter the condition and press Enter:
item.id === 845
The code pauses only when the condition is true.
XHR/fetch breakpoints
A screen breaks when one API call fails, but you don't know where in the code the call is made. In the Sources panel, expand the XHR breakpoints pane, click Add breakpoint and type part of the URL, such as /api/v1/auth.
The Chrome docs say DevTools then pauses when that string appears anywhere in a request's URL. It stops on the line that sends the request, so the call stack shows you who made the call.
| Breakpoint type | Pauses when | Typical use |
|---|---|---|
| Line-of-code | That line runs | You know where the bug is |
| Conditional | That line runs and the condition is true | One bad item in a loop |
| Logpoint | Never; it logs instead | Tracing values without pausing |
| XHR/fetch | A request URL contains your text | Finding who made an API call |
| DOM | A node or its children change | Finding what changed the page |
| Event listener | An event such as click fires |
Finding which handler runs |
3. Network panel: simulating bad conditions
Your development machine is fast and its network is reliable. Your users' phones may not be. Test the slow and broken cases on purpose.
Throttling
In the Network panel, open the throttling drop-down and pick a preset. The Network reference lists Fast 4G, Slow 4G and 3G, plus Offline. Slow speeds reveal bugs where the UI renders before data arrives, or where loading skeletons never appear.
Blocking requests
What happens when a third-party script or a web font fails to load? In the Network panel, right-click a request and select Block request, then reload. The Chrome docs say the Request conditions drawer opens and lists the blocked pattern. If one failed analytics script breaks your whole app, you have found a resilience problem.
Edit and resend
You're debugging a failed POST from a form. You don't need to fill the form in again. Right-click the request and select Edit and resend as fetch. DevTools opens the Console with the request written out as a fetch() call, which you can change and run again.
Resending repeats side effects
A resent POST is a real request. If it creates an order or sends an email, it does so again. Resend against a test environment or an endpoint that is safe to repeat.
4. Local overrides: test a fix on a live site
Local overrides make DevTools serve your own copy of a file (or of response headers) instead of what the server sends, and keep it across reloads.
The use case: you're chasing a CSS or JavaScript bug on production. You want to try a fix without deploying.
How to set it up, following the Chrome overrides guide:
- Open the Network panel, right-click the request for the file, and choose Override content (or Override headers).
- The first time, DevTools asks for a folder to store overrides in. Pick an empty folder and allow access.
- DevTools opens the file in the Sources panel. Edit it and save with Cmd+S (Mac) or Ctrl+S (Windows, Linux).
Reload the page, and Chrome uses your local version. When the fix works, copy it back to your repository. To turn overrides off, clear Enable Local Overrides in Sources > Overrides.
The docs list some limits. The cache is disabled while overrides are on. DOM edits made in the Elements panel aren't saved. Source-mapped files can't be overridden, so on a minified bundle you edit the minified file.
5. Automate the repetitive parts: Command Menu and snippets
The Command Menu
DevTools has a command palette, like many code editors. Press Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows, Linux) while DevTools is focused. Some useful commands:
- Screenshots: type "screenshot" to list the capture commands, including Capture area screenshot. No extension needed.
- Coverage: Show Coverage opens a panel that lists how many bytes of each CSS and JavaScript file went unused.
- Rendering: Show Rendering opens the Rendering tab. Turn on Paint flashing and Chrome flashes repainted areas green.
Snippets
If you keep pasting the same code into the Console, save it as a snippet. A snippet is a script stored in DevTools that you can run on any page.
- Go to Sources, then the Snippets tab (it may be under the » menu).
- Click New snippet and give it a name.
- Write your JavaScript and save.
For example, this snippet lists images that have no alt attribute:
// Snippet: find images without alt text
const missing = [...document.querySelectorAll('img:not([alt])')].map((img) => img.src);
console.table(missing);
To run a snippet on any page, open the menu with Cmd+O (Mac) or Ctrl+O (Windows, Linux), type ! and the snippet's name, then press Enter. In the Sources panel, Cmd+Enter or Ctrl+Enter runs the open snippet.
6. Performance: finding forced reflows
Long recordings in the Performance panel look dense, but you don't have to read every bar. Record while you use the slow part of the app, then stop the recording.
The Performance reference says long tasks are marked with a red triangle, with the part over 50 milliseconds shaded red. Start there. Since Chrome 131, the panel also has an Insights sidebar. Its Forced reflow insight flags interleaved DOM reads and writes that make the browser run layout, and it shows the call stack that caused it.
The usual fix is to do all the reads first, then all the writes. The DOM manipulation guide earlier in this series shows that pattern in code.
Summary
DevTools is a workspace, not only a log viewer. Logpoints keep your code clean. Conditional and XHR breakpoints find the right moment to pause. Throttling, blocking and overrides let you test failures and fixes on demand. Snippets turn your repeated Console work into one command.
Pick one of these and use it on the next bug you chase. Next in the series, ESLint, Prettier and Husky catch many of those bugs before they reach the browser.
Frequently asked questions
What is the difference between a logpoint and console.log?
A logpoint is set in DevTools and logs each time its line runs, without changing the file. console.log is code you add to the source, so it can be committed by accident. Both use the same message syntax.
Do local overrides change the site for other users?
No. Overrides live in a folder on your own machine, and only your browser uses them. Other visitors still get the server's files. Clear Enable Local Overrides to go back to the live version.
Why doesn't my conditional breakpoint pause?
The condition must be true in the scope of that line at the moment it runs. Check the variable names, and make sure the line actually runs. A logpoint on the same line, logging the values, quickly shows what the condition sees.
Can I throttle only one request instead of the whole page?
Yes. The Chrome request blocking guide shows a Throttle request option next to Block request in the request's right-click menu. The page-wide drop-down in the Network panel throttles everything.
Are these features available in other Chromium browsers?
Many Chromium-based browsers ship similar developer tools, but menus and features can differ by browser and version. This guide follows Google's Chrome DevTools documentation as checked on 2026-10-30.
Sources
Verified against the sources below on October 30, 2026. Products and docs change often: check the linked sources if something looks different.
- Chrome DevTools: Pause your code with breakpoints
- Chrome DevTools: Monitor changes in JavaScript with Live Expressions
- Chrome DevTools: Console API reference
- Chrome DevTools: Network features reference
- Chrome DevTools: Block and throttle network requests
- Chrome DevTools: Override files and HTTP response headers locally
- Chrome DevTools: Run commands with the Command Menu
- Chrome DevTools: Run snippets of JavaScript
- Chrome DevTools: Coverage
- Chrome DevTools: Rendering tab
- Chrome DevTools: Analyze rendering performance
- Chrome DevTools: Performance features reference
- Chrome for Developers blog: Insights sidebar in the Performance panel
All 30 parts in this series
- Part 01Overcoming the Daunting Start: A Strategic Roadmap for New Frontend Developers
- Part 02Beyond the Tags: Mastering HTML Architecture for Product-Based Roles
- Part 03From Selectors to BEM: CSS Concepts You Must Know for Professional Projects
- Part 04Mastering the Primitives: A Builder's Guide to JavaScript Data Types and Functions
- Part 05Demystifying Scope and Closure: Key Concepts for Writing Robust JavaScript
- Part 06Beyond Frameworks: Practical DOM Manipulation Techniques for High-Performance UIs
- Part 07From Prototypes to ES6 Classes: Understanding JavaScript's Object-Oriented Nature
- Part 08Architecting Scalable JavaScript: OOP Principles & Design Patterns
- Part 09Mastering the Metal: Essential Web APIs & Browser Internals for Frontend Engineers
- Part 10Understanding the JavaScript Runtime: Event Loop, Call Stack, and Task Queue Explained
- Part 11Mastering Asynchronous Operations with JavaScript Promises: A Builder's Guide
- Part 12Modern Async Patterns: Making Asynchronous Code Readable with Async/Await and Generators
- Part 13Inside the V8 Engine: A Deep Dive into JavaScript Execution
- Part 14Demystifying CORS, HTTP, and Security: A Builder’s Guide
- Part 15REST vs. GraphQL: A Frontend Engineer’s Reality Check
- Part 16Secure Frontend Auth: The Definitive Guide to JWTs, Cookies, and Storage Strategies
- Part 17Why TypeScript Matters: Adding Type Safety to Your JavaScript Projects
- Part 18Getting Started with React: Deconstructing JSX and Component Architecture
- Part 19React Architecture: Mastering State and Props in Class vs. Functional Components
- Part 20Mastering React Hooks: From useState to Building a Production-Ready Custom Hook
- Part 21React State Management: Context API vs. Redux & Building a Theme Switcher
- Part 22React Architecture: Advanced Navigation and Data Flow Patterns
- Part 23Automated Testing in React: Unit Testing with Jest and React Testing Library
- Part 24Mastering Chrome DevTools: Debugging Techniques That Save Hours of Development Time
- Part 25Automating Code Quality: The Modern Stack with ESLint, Prettier, and Husky
- Part 26Demystifying the Build Pipeline: A Deep Dive into Webpack and Babel Configuration
- Part 27Improving Performance with Server-Side Rendering: Concepts and Implementation
- Part 28From Development to Production: A Builder's Guide to Frontend Deployment Strategies
- Part 29Introduction to Micro Frontends: Building Scalable Architectures
- Part 30The Frontend Architecture: From Junior Developer to Tech Lead



Comments
Loading comments...