# sindresorhus/devtools-detect

Detect if DevTools is open and its orientation

Repository: https://github.com/sindresorhus/devtools-detect
Canonical: https://ross.abutalabs.com/products/devtools-detect
Homepage: https://sindresorhus.com/devtools-detect
Language: HTML
License: MIT
License Family: permissive
Archived: true
Last push: 2024-04-23T14:56:36+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4810, "days_push": 862, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2136, forks 221 (observed 2026-08-28T04:06:17.619496+00:00)

## What it is
A small JavaScript library that detects whether browser DevTools is open and its orientation, emitting a 'devtoolschange' event on changes. It works across Chrome, Safari, Firefox, and Opera DevTools, though the README notes it now suffers from false positives.

## Use cases
- detect if devtools is open in the browser
- pause canvas rendering when devtools is open
- show debug styles when devtools is open
- get notified when devtools opens or closes
- check devtools orientation in a react app

## When to choose
- you need a lightweight, dependency-free browser-side devtools detection with an event-based API
- you want a quick check of devtools open state or orientation in Chrome, Safari, Firefox, or Opera

## When to avoid
- you need reliable, false-positive-free detection — the README warns browsers changed and detection is now unreliable
- you need to detect undocked DevTools, which is not supported
- you need server-side or non-browser detection

## Facets
- artifact type: library
- maturity: maintenance
- function: developer-tools, browser-extension
- domain: developer-tools, web-development, browser-extensions
- platform: browser
- tags: devtools, detection, browser-api, javascript, frontend

## Member repositories
- sindresorhus/devtools-detect (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:17.619496+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:51:53.439618+00:00, confidence not recorded.
  - readme: https://github.com/sindresorhus/devtools-detect (fetched 2026-08-28T04:06:17.619496+00:00, sha 47491dc126d7)
  - homepage: https://sindresorhus.com/devtools-detect (fetched 2026-08-29T10:31:49.581552+00:00, sha 9deef92956f2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
