DEV Community

David Garcia
David Garcia

Posted on

🔎 Do you know the Sensors panel in DevTools?

🔄 How to use it:

  • Open DevTools (F12 or Ctrl+Shift+I in Chrome).
  • Go to the More tools > Sensors tab.

1️⃣ Override Geolocation

Simulates the user’s location anywhere in the world.

Example: If you’re developing a location-based app, you can test how it behaves in New York, Tokyo, or Buenos Aires without moving.

2️⃣ Simulate Device Orientation

Modifies accelerometer and gyroscope values to test device rotation changes.

Example: If you’re building an augmented reality app or a responsive website, you can check how it behaves when rotating the device.

3️⃣ Force Touch Events

Simulates touch interactions on mobile devices.

Example: If you’re optimizing touch gestures (swipes, pinches, long presses), you can test them without a physical device.

4️⃣ Emulate an Inactive Sensor

Simulates disabled or inactive sensors, such as proximity detection.

Example: Useful for testing how an app behaves when certain sensors are unavailable on the user’s device.

👉 Have you tried these options in your projects? 🚀

ℹ️ More info on Google’s website:
https://developer.chrome.com/docs/devtools/sensors?hl=en

Top comments (0)