Emulate mobile devices in Microsoft Edge DevTools

Use Device emulation to approximate how your page looks and responds on a mobile device. The Microsoft Edge DevTools provide a collection of features to help you emulate mobile devices. The collection includes the following features.

Limitations

Device emulation is a first-order approximation of the look and feel of your page on a mobile device. Device emulation does not actually run your code on a mobile device. Instead you simulate the mobile user experience from your laptop or desktop.

Some aspects of mobile devices are never emulated in DevTools. For example, the architecture of mobile CPUs is different than the architecture of laptop or desktop CPUs. When in doubt, your best bet is to actually run your page on a mobile device. Use Remote Debugging to interact with the code of a page from your machine while your page actually runs on a mobile device. You may view, change, debug, profile, or all four while you interact with the code. Your machine may be a notebook or desktop computer.

Simulate a mobile viewport

Choose Toggle device emulation (Toggle Device Toolbar) or choose Customize and control DevTools (...) > Device emulation to open the UI that enables you to simulate a mobile viewport.

The Device Toolbar

By default the Device Toolbar opens in Responsive Viewport Mode.

Responsive Viewport Mode

To quickly test the look and feel of your page across multiple screen sizes, drag the handles to resize the viewport to your required dimensions. You may also enter specific values in the width and height boxes. In the following figure, the width is set to 626 and the height is set to 516.

The handles for changing the dimensions of the viewport when in Responsive Viewport Mode

Show media queries

If you have defined media queries on your page, jump to the viewport dimensions where those media queries take effect by showing media query breakpoints above your viewport. Choose More options > Show media queries.

Show media queries

Choose a breakpoint to change the width of the viewport so that the media query gets triggered.

Choose a breakpoint to change the width of the viewport

Set the device type

Use the Device Type list to simulate a mobile device or desktop device.

The Device Type list

The following table describes the differences between the available device type options. The Rendering method column refers to whether Microsoft Edge renders the page as a mobile or desktop viewport. The Cursor icon column refers to what type of cursor is displayed when you hover on the page. The Events triggered column refers to whether the page triggers touch or click events when you interact with the page.

Option Rendering method Cursor icon Events triggered
Mobile Mobile Circle touch
Mobile (no touch) Mobile Normal choose
Desktop Desktop Normal choose
Desktop (touch) Desktop Circle touch

Note

If the Device Type list is not displayed, choose More options > Add device type.

Mobile Device Viewport Mode

To simulate the dimensions of a specific mobile device, select the device from the Device list.

The Device list

Rotate the viewport to landscape orientation

Test your webpage in landscape orientation.

Note

The Rotate button disappears if your Device Toolbar is narrow.

The Device Toolbar

For more information, navigate to Set orientation.

Show device frame

Display the physical device frame around the viewport when you simulate the dimensions of a specific mobile device such as an iPhone 6.

  1. Open More options.
  2. Choose Show device frame.

Note

If a device frame for a particular device is not displayed, it means that DevTools does not have art for the option.

Add a custom mobile device

If the mobile device option that you need is not included on the default list, you may add a custom device. To add a custom device, complete the following steps.

  1. Choose the Device list > Edit.

    Choose Edit

  2. Choose Add custom device.

  3. On Emulated Devices, enter a device name, screen width, and screen height for the custom device. The device pixel ratio, user agent string, and device type fields are optional. The device type field defaults to Mobile.

    Create a custom device

Show rulers

If you need to measure screen dimensions, you may use rulers to measure the screen size in pixels. Choose More options > Show rulers to display rulers above and to the left of your viewport.

Zoom the viewport

To test the look and feel of your page at multiple zoom levels, use the Zoom list to zoom in or out.

Zoom

Throttle the network and CPU

Mobile devices often have network and CPU constraints. Ensure you test how quickly your page loads and how it responds at different internet and CPU speeds.

Throttle the network and CPU.

  1. Choose Throttle list and change the preset to Mid-tier mobile or Low-end mobile.
    • Mid-tier mobile simulates fast 3G and throttles your CPU. It is four times slower than normal.
    • Low-end mobile simulates slow 3G and throttles your CPU. It is six times slower than normal.

All of the throttling is based upon the normal capability of your laptop or desktop.

The Throttle list in the Device Toolbar

Note

If the Throttle list is hidden, your Device Toolbar is too narrow. To access the Throttle list, increase the width of the Device Toolbar.

The Device Toolbar

Throttle the CPU only

To throttle the CPU only and not the network, complete the following steps.

  1. Choose the Performance panel, and choose Capture Settings (Capture Settings).

  2. Choose CPU > 4x slowdown or 6x slowdown.

    The CPU list in the Performance panel

Throttle the network only

To throttle the network only, complete the following steps.

  1. Choose the Network tool.

  2. Choose Online > Fast 3G or Slow 3G.

    The Throttle list in the Network panel

    Or select Control+Shift+P (Windows, Linux) or Command+Shift+P (macOS) to open the Command Menu, type 3G, and choose Enable fast 3G throttling or Enable slow 3G throttling.

    The Command Menu

You may also set network throttling from the Performance panel.

  1. Choose Capture Settings (Capture Settings) and choose the Network list and change the preset to Fast 3G or Slow 3G.

    Set network throttling from the Performance panel

Override geolocation

If your page depends on geolocation information from a mobile device to render properly, provide different geolocations using the geolocation overriding UI.

  1. Choose Customize and control DevTools (...) > More tools > Sensors.

Sensors for geolocation

  1. Open the Command Menu.
  • Select Control+Shift+P (Windows, Linux) or Command+Shift+P (macOS).
  1. Type Sensors, and choose Show Sensors.

Show Sensors for geolocation

On the Sensors panel, you may select one of the preset locations included in DevTools using the Location drop-down menu. To enter a custom location, choose Other… and enter the coordinates of your custom location. To test your page in an error state when location information is unavailable, choose Location unavailable.

Sensors panel with a preset location selected

Set orientation

If your page depends on orientation information from a mobile device to render properly, open the orientation UI.

  1. Choose Customize and control DevTools (...) > More tools > Sensors.

Sensors for orientation

  1. Open the Command Menu.
  • Select Control+Shift+P (Windows, Linux) or Command+Shift+P (macOS).
  1. Type Sensors, and choose Show Sensors.

Show Sensors for orientation

On the Sensors panel, you may select a preset orientation from the Orientation drop-down menu. To enter your own orientation, choose Custom orientation, and enter your own alpha, beta, and gamma values.

Orientation options on the Sensors panel

Set user agent string

If your page depends on the user agent string from a mobile device to render properly, use the Network conditions panel to provide different user agent strings.

  1. Choose Customize and control DevTools (...) > More tools > Network conditions.

Network conditions entry in the More tools menu

  1. Open the Command Menu.
  • Select Control+Shift+P (Windows, Linux) or Command+Shift+P (macOS).
  1. Type Network conditions, and choose Show Network conditions.

Show Network conditions

Next to User agent, clear the Select automatically checkbox. Then, choose Custom... to select from a list of predefined user agent strings. To enter your own user agent string, enter the string in Enter a custom user agent.

Set the user agent string to Microsoft Edge on macOS

Getting in touch with the Microsoft Edge DevTools team

Use the following options to discuss the new features and changes in the post, or anything else related to DevTools.

  • Send your feedback using the Send Feedback icon or select Alt+Shift+I (Windows, Linux) or Option+Shift+I (macOS) in DevTools.
  • Tweet at @EdgeDevTools.
  • Submit a suggestion to The Web We Want.
  • To file bugs about this article, use the following Feedback section.

The Send Feedback icon in the Microsoft Edge DevTools

Note

Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons Attribution 4.0 International License.
The original page is found here and is authored by Kayce Basques (Technical Writer, Chrome DevTools & Lighthouse).

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.