sodcalculator

10 Tech How-To

Chrome DevTools Cross-Browser Testing Guide

Guide 10-9815 · Updated · Step by step

This guide shows you how to use Chrome DevTools to test and debug your website across different browsers and devices, all from one place. You’ll learn to simulate mobile viewports, emulate device features, and spot rendering issues before your users do. No extra software is needed—just Chrome and your website.

What You’ll Need

  • Google Chrome (latest version recommended)
  • Your website or web app running locally or hosted
  • Basic familiarity with right-clicking and opening browser menus

Step-by-Step

  1. Open DevTools

    Right-click anywhere on your page and select “Inspect,” or press F12 (Windows/Linux) or Cmd+Option+I (Mac). The DevTools panel opens, usually docked to the right or bottom.

  2. Enable Device Toolbar

    Click the device icon (a rectangle with a phone outline) in the top-left of DevTools, or press Ctrl+Shift+M (Windows/Linux) or Cmd+Shift+M (Mac). This toggles the device simulation mode.

  3. Choose a Device or Set Custom Dimensions

    At the top of the page, a dropdown shows “Responsive” by default. Click it to see a list of popular devices (iPhone, Pixel, iPad, etc.). Select one to instantly resize the viewport to that device’s screen size. For a custom size, choose “Responsive” and drag the handles on the edges of the viewport.

  4. Test Different Screen Sizes

    With a device selected, scroll and interact with your page. Check for horizontal scrolling, overlapping elements, tiny text, or broken layouts. Use the device toolbar’s width and height fields to type exact pixel values if you have breakpoints to test.

  5. Emulate Device Features

    Click the three-dot menu (⋯) in the device toolbar to access more options:

    • Device pixel ratio: Simulate high-DPI screens (e.g., 3x for modern phones).
    • Network throttling: Choose “Slow 3G” or “Fast 3G” to see how your site loads on slow connections.
    • CPU throttling: Reduce CPU speed to mimic low-end devices.
  6. Simulate Touch Events

    In the same three-dot menu, ensure “Show device frame” is on for a visual phone bezel. To test touch interactions, enable “Touch simulation” (it’s usually on when a device is selected). This makes mouse clicks behave like taps and enables touch events.

  7. Test Responsive Breakpoints

    Use the “Responsive” mode and drag the viewport width slowly. Watch how your layout changes at different widths. Note the exact pixel widths where your design breaks (e.g., text overflows, images stretch). These are your breakpoints to fix.

  8. Inspect Elements in Different States

    Right-click an element and select “Inspect.” In the Styles pane, click the “:hov” (or “Toggle Element State”) button to force pseudo-states like :hover, :focus, or :active. This helps you see how buttons and links look on touch devices where hover is less common.

  9. Use the Rendering Tab

    Press Ctrl+Shift+P (or Cmd+Shift+P on Mac) to open the Command Menu. Type “Rendering” and select “Show Rendering.” This opens a panel where you can:

    • Check “Media” to emulate CSS media features like prefers-color-scheme (dark mode).
    • Enable “Frame Rendering Stats” to see FPS and GPU usage.
    • Turn on “Emulate CSS prefers-reduced-motion” to test accessibility.
  10. Test with Browser DevTools Open on Another Browser

    DevTools is great for simulation, but it’s not a perfect substitute. Open your site in Firefox, Safari, or Edge and use their built-in responsive modes (e.g., Firefox’s Responsive Design Mode, Safari’s Develop menu). Compare the results to catch browser-specific bugs.

  11. Use the Console for Errors

    While simulating, keep an eye on the Console tab. Errors like “TypeError” or “SyntaxError” may only appear in certain viewport sizes or when certain features are emulated. Fix any errors that appear.

  12. Take Screenshots for Documentation

    In the device toolbar, click the three-dot menu and select “Capture screenshot” to save a full-page screenshot of the current simulation. This is useful for sharing with your team or tracking issues.

Common Mistakes

  • Forgetting to reset device emulation: After testing, you might leave the device toolbar on, which makes your browser window tiny. Always toggle it off when done.
  • Trusting emulation blindly: Emulation simulates screen size and some features, but not the actual rendering engine of Safari or Firefox. Always verify on real browsers.
  • Ignoring the console: Layout issues are often caused by JavaScript errors that only appear under certain conditions. Always check the console.
  • Not testing with network throttling: A site that loads instantly on your fast connection may be unusable on 3G. Always test slow connections.
  • Overlooking touch behavior: Hover states don’t exist on touch devices. Test with touch simulation to see if your menus and buttons still work.

Tips

  • Use the device toolbar’s “Responsive” mode for breakpoint testing: It’s faster than selecting every device individually.
  • Set up a custom device for your most common target: In the device dropdown, click “Edit” to add a custom device with specific dimensions and pixel ratio.
  • Combine with Lighthouse: Run Lighthouse from the DevTools “Audits” panel to get performance and accessibility scores for mobile.
  • Use the “Sensors” panel: From the Command Menu, open “Show Sensors” to simulate geolocation and device orientation—useful for mobile-specific features.
  • Keep DevTools open in a separate window: Press Ctrl+Shift+D (Windows/Linux) or Cmd+Option+D (Mac) to undock DevTools, giving you more screen space for the page.

Troubleshooting

  • Device toolbar doesn’t show the device I want: Click the dropdown and select “Edit” to add a custom device with the exact width, height, and pixel ratio.
  • The page looks fine in emulation but broken on a real phone: This is common because emulation doesn’t account for browser differences. Use a real device or a cloud testing service to verify. Also check that your viewport meta tag is correct: <meta name="viewport" content="width=device-width, initial-scale=1">.
  • Touch simulation doesn’t work: Make sure you have a device selected (not “Responsive”). If it still doesn’t work, toggle the “Touch simulation” option in the three-dot menu.
  • Network throttling options are grayed out: This happens when DevTools is in a detached window or when the browser is in a special mode. Close and reopen DevTools, or restart Chrome.
  • Rendering tab doesn’t show CSS media emulation: Make sure you’re in the latest Chrome version. If not, update Chrome and try again.

Frequently Asked Questions

Can Chrome DevTools test Safari-specific bugs?

No, it can only simulate screen size and some features. Safari uses WebKit, which differs from Chrome’s Blink engine. You need to test in real Safari or use a service like BrowserStack.

How do I test dark mode in Chrome DevTools?

Open the Rendering tab (via Command Menu) and under “Emulate CSS media feature prefers-color-scheme,” select “prefers-dark.” This will apply your dark mode styles if you’ve defined them.

Does device emulation affect performance?

Yes, CPU throttling and network throttling can make the page slower, which is the point. But it also means DevTools itself may be slower. Close other tabs to improve accuracy.

Why does my site look different in Firefox’s responsive mode than in Chrome’s?

Because they are different browsers with different rendering engines. That’s exactly why you should test in multiple browsers. Use each browser’s own dev tools to simulate devices.

Can I test multiple devices at once?

No, DevTools only simulates one viewport at a time. For multi-device testing, use a tool like Chrome’s built-in “Device Mode” in combination with a real device or a cloud service.

How do I save a device profile for later?

In the device dropdown, select “Edit,” then click “Add custom device.” Fill in the details and save. It will appear in the list for future sessions.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →