This content originally appeared on DEV Community and was authored by Sourabh Gawande
A practical, scenario-based breakdown of Chrome DevTools features that every developer should know
Chrome DevTools is arguably the most powerful debugging toolkit available to web developers, yet most of us only scratch the surface. This guide breaks down DevTools by real-world use cases you encounter daily, showing you exactly which tools to use and how to use them effectively.
Performance & Speed Analysis
“My page loads slowly – where’s the bottleneck?”
Use the Performance Tab:
- Open DevTools → Performance tab
- Click the record button (circle icon)
- Reload your page or interact with it
- Stop recording and analyze the flame chart
What to look for:
- Red triangles: Performance warnings
- Long yellow bars: JavaScript execution blocking the main thread
- Purple bars: Layout/reflow operations
- Green bars: Painting operations
Pro tip: Use the “Screenshots” checkbox to see exactly when visual changes occur.
“My API calls are taking forever – how long exactly?”
Use the Network Tab:
- Open DevTools → Network tab
- Reload the page or trigger your API calls
- Look at the Time column for total request duration
- Click on any request to see the detailed timing breakdown:
- Queueing: Time waiting to be processed
- Stalled: Time spent waiting for available connection
- DNS Lookup: Domain resolution time
- Initial Connection: Time to establish connection
- SSL: Time for SSL handshake
- Request Sent: Time to send request data
- Waiting (TTFB): Time to first byte from server
- Content Download: Time to download response
Filtering tricks:
- Type
XHR
to see only API calls - Type
fetch
to see fetch requests - Use
larger-than:1M
to find large files
“JavaScript is blocking my UI – what’s causing it?”
Use the Performance Tab + Call Tree:
- Record a performance profile during the slow interaction
- Look for long yellow bars in the flame chart
- Click on them to see the Call Tree tab
- Sort by Self Time to find the heaviest functions
Coverage Tab for unused code:
- Open Coverage tab (in drawer)
- Click record and interact with your page
- Red bars show unused JavaScript/CSS
- Click on files to see exactly which lines aren’t executed
Responsive Design & Mobile Testing
“How does my site look on different screen sizes?”
Device Simulation:
- Click the Device Toggle (phone/tablet icon) or press
Ctrl+Shift+M
- Select from preset devices or click Edit to add custom dimensions
- Test common breakpoints: 320px (mobile), 768px (tablet), 1024px (desktop)
Custom responsive testing:
- Drag the viewport edges to test any size
- Click Responsive dropdown to quickly switch between sizes
- Use the Zoom dropdown to test different pixel densities
“Is my mobile experience actually usable?”
Touch Simulation:
- Enable Device Mode
- Click the three dots menu → More tools → Sensors
- Set Touch to “Force enabled”
- Test your touch interactions
Network throttling for mobile:
- In Network tab, click No throttling dropdown
- Select Slow 3G or Fast 3G to simulate mobile networks
- Test how your app performs on slower connections
“What’s causing horizontal scroll on mobile?”
Element inspection trick:
- Switch to mobile view
- Right-click and Inspect Element
- In Console, run:
document.querySelectorAll('*').forEach(el => {
if (el.scrollWidth > document.body.clientWidth) {
console.log('Wide element:', el, el.scrollWidth);
}
});
JavaScript Debugging
“My code is throwing errors – where exactly?”
Console Tab mastery:
- Red errors show exactly where code failed
- Click the link on the right to jump to the exact line
- Use
console.trace()
in your code to see the full call stack
Sources Tab debugging:
- Go to Sources tab
- Find your file in the file tree
- Click line numbers to set breakpoints
- Reload/trigger the code to pause execution
- Use the Scope panel to inspect variable values
“Variables aren’t what I expect – how do I inspect them?”
Live expression watching:
- In Console, click the eye icon (Create live expression)
- Enter variable names or expressions to watch in real-time
- They update automatically as you step through code
Breakpoint debugging:
- F10: Step over (next line)
- F11: Step into (enter functions)
- Shift+F11: Step out (exit current function)
- Hover over any variable to see its current value
“Event listeners aren’t firing – what’s attached where?”
Elements Tab event inspection:
- Select any element in the Elements tab
- In the right panel, scroll to Event Listeners
- See all events attached to that element
- Click Framework listeners to see through library abstractions
- Click the function name to jump to the code
Console event monitoring:
// Monitor all click events
monitorEvents(document, 'click');
// Monitor specific element
monitorEvents($0, 'click'); // $0 is currently selected element
// Stop monitoring
unmonitorEvents(document);
Network & API Analysis
“Which requests are failing and why?”
Network Tab filtering:
- Red entries: Failed requests
- Yellow entries: Redirects
-
Filter by status: Type
status-code:404
orstatus-code:500
-
Filter by domain: Type
domain:api.yoursite.com
Response inspection:
- Click on any failed request
- Check Headers tab for request/response details
- Check Response tab for error messages
- Check Preview tab for formatted JSON
“What headers are being sent/received?”
Headers analysis:
- Click on any request in Network tab
-
Headers tab shows:
- Request Headers: What your browser sent
- Response Headers: What the server returned
- Query String Parameters: URL parameters
- Form Data: POST body content
Copy as cURL:
- Right-click any request → Copy → Copy as cURL
- Test the exact same request in terminal or Postman
“How do I simulate slow network conditions?”
Network throttling:
- Network tab → No throttling dropdown
- Choose preset (Slow 3G, Fast 3G) or Add custom profiles
- Watch how your app handles slow loading
Offline testing:
- Select Offline to test your app’s offline behavior
- Great for testing service worker functionality
Security & Privacy
“What cookies/storage does my site use?”
Application Tab overview:
- Open Application tab
- Left sidebar shows all storage:
- Local Storage: Persistent key-value data
- Session Storage: Session-only data
- Cookies: All cookies with expiration dates
- IndexedDB: Structured database storage
- Cache Storage: Service worker caches
Cookie inspection:
- Click Cookies → your domain
- See all cookies with values, expiration, and security flags
- Double-click any value to edit for testing
“Are there any security warnings?”
Security Tab:
- Click Security tab
- See certificate details and security state
- Check for mixed content warnings (HTTP resources on HTTPS page)
Console security warnings:
- Red security warnings appear in Console
- Common issues: mixed content, unsafe inline scripts, CSP violations
SEO & Accessibility
“What accessibility issues exist?”
Lighthouse audit:
- Open Lighthouse tab
- Select Accessibility category
- Click Generate report
- Get specific recommendations with line numbers
Elements Tab accessibility:
- Select any element
-
Accessibility panel (right side) shows:
- ARIA attributes
- Computed accessibility name
- Role and properties
Accessibility tree:
- Console → Settings (gear icon) → Experiments
- Enable “Full accessibility tree in Elements panel”
- See how screen readers interpret your page
“How does my site appear to screen readers?”
Screen reader simulation:
- Elements tab → select element
- Right panel → Accessibility section
- See Name, Role, and Properties
- Use Computed Properties to see final accessibility values
Application State & Storage
“What data is stored locally?”
Storage inspection:
- Application tab → Storage section
- Local Storage: Persistent data that survives browser restarts
- Session Storage: Data cleared when tab closes
- IndexedDB: Complex structured data storage
Quick storage clearing:
- Right-click on any storage type → Clear
- Or use Console:
localStorage.clear()
,sessionStorage.clear()
“How do I modify storage for testing?”
Direct editing:
- Application tab → Local/Session Storage
- Double-click any key or value to edit
- Right-click to add new entries
Console manipulation:
// Set values
localStorage.setItem('key', 'value');
sessionStorage.setItem('user', JSON.stringify({id: 123}));
// Get values
localStorage.getItem('key');
JSON.parse(sessionStorage.getItem('user'));
// Remove specific items
localStorage.removeItem('key');
CSS & Visual Debugging
“Why doesn’t my CSS look right?”
Elements Tab CSS debugging:
- Right-click element → Inspect
- Styles panel shows all applied CSS
- Crossed-out styles: Overridden rules
- Orange warning icons: Invalid CSS values
- Computed tab: Final calculated values
Box model visualization:
- Select element → Styles panel
- Hover over the box model diagram
- See margin (orange), border (yellow), padding (green), content (blue)
CSS changes testing:
- Click any CSS property to edit
- Add new properties by clicking in empty space
- Changes are temporary – refresh to revert
“How do I find which CSS rule is affecting my element?”
CSS cascade inspection:
- Select element in Elements tab
- Styles panel shows rules in cascade order (most specific first)
- Look for Inherited from sections
- Use the filter box to search for specific properties
CSS specificity calculator:
- Hover over any CSS selector to see specificity value
- Higher numbers win the cascade battle
Advanced Debugging Techniques
“Memory leaks are suspected – how do I find them?”
Memory Tab analysis:
- Memory tab → Heap snapshot
- Take snapshot, interact with your app, take another snapshot
- Compare snapshots to see memory growth
- Look for Detached DOM nodes and Event listeners
Performance memory tracking:
- Performance tab
- Check Memory checkbox before recording
- See memory usage over time in the timeline
“How do I debug Web Workers or Service Workers?”
Application Tab Workers:
- Application tab → Service Workers
- See registration status and update cycles
- Sources tab to debug worker code with breakpoints
Worker console:
- Worker console messages appear in main DevTools Console
- Use
console.log()
in worker code to debug
Console Power User Tips
“Advanced Console commands I should know?”
Element selection shortcuts:
$0 // Currently selected element
$1 // Previously selected element
$('selector') // Same as document.querySelector()
$$('selector') // Same as document.querySelectorAll()
Network monitoring:
// Monitor all XHR requests
monitorEvents(window, 'load');
// Log all function calls to an object
monitor(functionName);
unmonitor(functionName);
Performance helpers:
// Time any operation
console.time('myOperation');
// ... your code ...
console.timeEnd('myOperation');
// Performance mark for detailed timing
performance.mark('start');
// ... code ...
performance.mark('end');
performance.measure('myMeasure', 'start', 'end');
Real-World Debugging Workflows
Workflow 1: “My React app is slow”
- Performance tab → Record during slow interaction
- Look for long yellow bars (JavaScript execution)
- Click into them to see which React components are slow
- Sources tab → Add breakpoints in suspicious components
- React DevTools (if installed) → Profiler for component render times
Workflow 2: “API integration isn’t working”
- Network tab → Find the failing request
- Check Status code and Response tabs
- Copy as cURL to test outside browser
- Console → Check for CORS errors
- Security tab → Verify HTTPS issues
Workflow 3: “Mobile site looks broken”
- Device toggle → Select target device
- Elements tab → Inspect problematic elements
- Computed styles → Check actual CSS values
- Console → Run viewport debugging:
console.log('Viewport:', window.innerWidth, window.innerHeight);
console.log('Device pixel ratio:', window.devicePixelRatio);
Pro Tips for Each Tab
Elements Tab
- H key: Hide/show selected element
- Ctrl+Z: Undo DOM changes
- Right-click → Scroll into view: Find elements in viewport
- Break on → Subtree modifications: Pause when DOM changes
Console Tab
- Ctrl+L: Clear console
- Filter levels: Click Error, Warning, Info to filter messages
- Preserve log: Keep console messages across page reloads
- $_: Reference to last evaluated expression
Network Tab
- Ctrl+E: Export HAR file for external analysis
- Response Headers → view source: See raw headers
- Timing tab: Detailed breakdown of request phases
- Disable cache: Checkbox to force fresh requests
Sources Tab
- Ctrl+P: Quick file finder
- Ctrl+Shift+F: Search across all files
- Conditional breakpoints: Right-click line number
- Logpoints: Console.log without modifying code
Application Tab
- Clear storage: Remove all data for clean testing
- Manifest: Check PWA configuration
- Service Workers: Debug offline functionality
Common Debugging Scenarios
Scenario: “Button click isn’t working”
// In Console, check if element exists
$('button').length
// Check event listeners
getEventListeners($('button'))
// Test click programmatically
$('button').click()
// Check if element is actually clickable
$('button').disabled
Scenario: “CSS not applying”
- Inspect element → Computed tab
- Search for your CSS property
- If missing: Check Styles for syntax errors (orange warnings)
- If overridden: Look at specificity values
Scenario: “Form data not submitting”
- Network tab → Submit form
- Check if POST request appears
-
Headers → Request Headers → verify
Content-Type
- Request tab → verify form data is included
Quick Debugging Checklist
Page Load Issues:
- [ ] Network tab: Any failed requests (red)?
- [ ] Console: Any JavaScript errors (red)?
- [ ] Performance: Any long-running scripts (yellow bars)?
- [ ] Lighthouse: Performance score below 90?
Mobile Issues:
- [ ] Device mode: Tested on actual target devices?
- [ ] Console: Any viewport meta tag warnings?
- [ ] Network: Tested on slow connections?
- [ ] Touch: All interactive elements large enough (44px minimum)?
API Issues:
- [ ] Network: Request/response headers correct?
- [ ] Console: Any CORS errors?
- [ ] Security: Mixed content warnings?
- [ ] Network: Response time acceptable under throttling?
Advanced Features You Should Know
Local Overrides
Test changes without deploying:
- Sources tab → Overrides
- Select folder to save changes
- Edit any file and changes persist across reloads
Workspaces
Edit files directly:
- Sources → Filesystem
- Add your project folder
- Edit files directly in DevTools
- Changes save to your actual files
Device Mode Advanced
Custom device profiles:
- Device mode → Edit button
- Add custom devices with specific:
- Screen resolution
- Device pixel ratio
- User agent string
- Touch capabilities
Performance Insights (New!)
Automated performance analysis:
- Performance Insights tab (newer Chrome versions)
- Automatically identifies performance opportunities
- Provides specific recommendations with code examples
Console Commands Every Developer Should Know
// Clear console
clear()
// Copy any value to clipboard
copy(anyObject)
// Get all images on page
$$('img').map(img => img.src)
// Find elements with specific text
[...document.querySelectorAll('*')].filter(el =>
el.textContent.includes('search term'))
// Monitor function calls
monitor(functionName)
// Debug function calls
debug(functionName) // Adds automatic breakpoint
// Check performance
console.time('operation')
// ... code ...
console.timeEnd('operation')
// Table format for objects
console.table(arrayOfObjects)
// Group related logs
console.group('API Calls')
console.log('Request 1')
console.log('Request 2')
console.groupEnd()
Productivity Shortcuts
Essential keyboard shortcuts:
- F12: Open/close DevTools
- Ctrl+Shift+C: Inspect element mode
- Ctrl+Shift+J: Jump to Console
- Ctrl+Shift+I: Open DevTools
- Ctrl+R: Reload page
- Ctrl+Shift+R: Hard reload (ignore cache)
- Ctrl+Shift+Delete: Clear browsing data
Panel shortcuts:
- Ctrl+[: Previous panel
- Ctrl+]: Next panel
- Escape: Toggle drawer (Console while in other tabs)
Pro Tips from the Trenches
Use the Command Menu: Press
Ctrl+Shift+P
to access any DevTools feature quicklyScreenshot any element: Right-click element → Capture node screenshot
Copy element selectors: Right-click element → Copy → Copy selector
Dock DevTools smartly: Click the three dots → choose docking position based on your task
Multi-line Console editing: Press
Shift+Enter
for new lines in ConsolePreserve console across navigations: Settings → Preserve log
Dark mode: Settings → Preferences → Theme: Dark
Conclusion
Chrome DevTools is incredibly powerful when you know which tool to reach for in each situation. The key is thinking in terms of problems you need to solve rather than features you want to explore.
Bookmark this guide and refer back to it when you encounter these common debugging scenarios. The more you use these workflows, the faster you’ll become at diagnosing and fixing issues.
Next time you’re debugging, ask yourself:
- What exactly am I trying to figure out?
- Which DevTools tab would give me that information?
- What specific metric or value am I looking for?
Master these use cases, and you’ll debug faster and build better web applications.
Want to level up your debugging skills further? Practice these workflows on your current projects and you’ll be amazed at how much faster you can identify and fix issues.
This content originally appeared on DEV Community and was authored by Sourabh Gawande