How to Use the Sensors Tool in Microsoft Edge DevTools to Emulate Geolocation, Device Orientation, and Touch

Modern responsive web applications frequently rely on device hardware APIs to deliver tailored user experiences. Location-based web apps query the HTML5 Geolocation API, 3D interactive graphics track gyroscope device orientation, and touch interfaces respond to mobile gesture events. However, testing these hardware-dependent features during desktop development traditionally requires deploying code to physical mobile test devices and physically moving around.

Microsoft Edge DevTools includes a powerful built-in hardware emulator known as the Sensors Tool. Located in the DevTools drawer, the Sensors panel allows developers to mock arbitrary GPS coordinates, test custom timezone overrides, emulate accelerometer tilt angles, and simulate touch events directly inside the desktop browser. This guide demonstrates how to configure and use the Sensors tool.

Opening the Sensors Drawer in Edge DevTools

  1. Open Microsoft Edge and press F12 to launch DevTools.
  2. Press Ctrl + Shift + P (Windows) or Cmd + Shift + P (macOS) to open the Command Menu.
  3. Type Sensors and select Show Sensors.
  4. The Sensors tool docks immediately in the bottom drawer panel.

Core Emulation Capabilities

1. Overriding Geolocation Coordinates

Test how your web application behaves for users located in different cities or continents without using a VPN:

  1. Locate the Location dropdown menu in the Sensors pane.
  2. Choose a preset metropolitan city (e.g. London, Tokyo, San Francisco, or Mumbai).
  3. Alternatively, select Other… and enter custom numeric latitude, longitude, and timezone values (e.g. Lat: 51.5074, Long: -0.1278).
  4. Choose Location unavailable from the dropdown to test fallback error handling when a user denies browser location permissions.

2. Simulating Device Orientation (Gyroscope & Accelerometer)

For web applications responding to device tilt or 3D canvas motion (such as gaming, augmented reality, or card flip interactions):

  1. Navigate to the Orientation section.
  2. Select an orientation preset (e.g. Portrait upside down, Landscape left, Display down).
  3. Alternatively, click and drag the interactive 3D mobile phone model on screen. Moving the graphic rotates the virtual device in three-dimensional space, feeding live alpha, beta, and gamma rotation values into the browser’s DeviceOrientationEvent listener.

3. Emulating Touch and Pressure States

In the Touch section:

  • Select Force enabled to force the browser to treat all mouse clicks as mobile touch events (firing touchstart, touchmove, and touchend).
  • Emulate pressure sensitivity levels to test dynamic drawing canvases and pressure-sensitive web controls.

Sensors Tool Quick Reference Table

Sensor Feature Hardware API Emulated Primary Testing Context
Location Override navigator.geolocation Local store finders, regional pricing, weather widgets
Timezone ID Intl.DateTimeFormat Localized date/time displays and calendar scheduling
Device Orientation DeviceOrientationEvent Gyroscope games, 3D product view models, compasses
Touch Simulation TouchEvent Mobile swipe gestures, carousel navigation, drawing apps

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.