Skip to Content
Platform Ontology

DevTools Protocol side effect

A page can notice when a tool is listening to the browser over the DevTools Protocol.

Gets silentlyWhile you use it

Playwright, Puppeteer and many cloud browsers drive Chrome through the DevTools Protocol. When the Runtime domain is enabled, the browser serializes logged objects for the tool. A page can plant an Error whose stack getter runs only when that happens, which reveals the listener. Recent tools reduce this, so it is a moving target.

What it can and can't do

What the user does: Nothing. It runs from page script

It can

  • Detect a DevTools Protocol client that enabled the Runtime domain
  • Add the result to a bot score
  • Catch automation that hides the webdriver flag

It cannot

  • See which tool is attached
  • Work after the tool patches or avoids Runtime.enable
  • Tell a developer opening DevTools from a bot
  • Work in Firefox or Safari

How it differs between platforms: Real developers who open DevTools can trigger it too. Newer automation tools avoid enabling the Runtime domain, which defeats the test.

Browser support

Version notes
  • Chrome: Seen with Chromium based browsers driven over the DevTools Protocol
  • Edge: Same Chromium behavior
  • Chrome on Android: Seen when Chrome is driven over the protocol
  • Samsung Internet: Chromium based; not verified

How a site asks for it

APIconsole.debug(new Error()) with a getter on Error.prototype.stack; any accessor that fires only when Runtime.enable serializes the object
Browser compat keysapi.Console.debug_static
api.Error.stack
How access is grantednone
What the user seesNone
Needs a secure context (HTTPS)No
Needs a user gestureNo
How long it lastsNot listed
How to take it backNot listed
Inside an iframeNot listed

Typical flow

  1. Page defines an Error with a stack getter
  2. Page logs the Error with console.debug
  3. If a protocol client serializes it, the getter runs and the page sees it

Data you get

Shape: boolean
How often: per check

FieldTypeUnitRangePrecision
stackGetterCalledbooleanNonetrue when a protocol client serialized the logged objectNot listed

Technical limits

  • Chromium only
  • Defeated by tools that avoid Runtime.enable
  • Developers with DevTools open can match

The story

What it is

Some tools watch the browser by talking to it behind the scenes. The page can catch that conversation by leaving a trap that only springs when someone listens.

For you

You never see it. If you open DevTools yourself it can also fire. Agent tools that use the protocol can be spotted this way.

For makers

This is a cat and mouse game. Treat the result as one weak signal that decays as tools change. Do not use it alone to block people, because opening DevTools can trigger it.

Where you see it

TypeExampleApps
securityA bot filter marks sessions where the stack getter fires.None named
shoppingA retailer flags checkout sessions from protocol driven browsers.None named
adsAn ad verifier removes views from protocol driven browsers.None named
gamesAn anti cheat script looks for a debugger style listener.None named
developerA tool maker tests whether their library trips the check.Playwright, Puppeteer
enterpriseA fraud team adds the check to a layered score for login attempts.None named

Risks

  • False positives for people with DevTools open
  • Fast moving

What the platform says

Good uses and abuse

Legitimate uses

  • Bot defense

Known abuse

  • Blocking legitimate agents
  • Flagging developers

Scores

ScoreValueMeaning
Sensitivity1 of 5How revealing the data is
Utility3 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bits0.3Rough identifying entropy, when known

History

  • 2022, Chrome: Runtime.enable serialization described as a way to detect automation

Sources

How well checked: Inferred from related behavior.

On this page