← Back to release summary

Host and screenshot restrictions for chrome.debugger API

Category
Miscellaneous
Type
New or changed feature
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

The [`chrome.debugger` extension API](https://developer.chrome.com/docs/extensions/reference/api/debugger) lets you send [Chrome DevTools Prototcol](https://chromedevtools.github.io/devtools-protocol/) commands to a specified `target`, for example, a tab, an iframe, or a service worker. When connecting (attaching) to a target, the API can now enforce permissions on managed browsers by validating enterprise host and screenshot policies. On enterprise devices, some policies can restrict extensions from attaching the debugger using an all-or-nothing model at attach time (browser.debugger.attach()): - For hosts, the [ExtensionSettings](https://chromeenterprise.google/policies/#ExtensionSettings) enterprise policy can be configured to block hosts for an extension, returning the error `Host access is restricted by policy`. - For screenshots, the enterprise policy [DisableScreenshots](https://chromeenterprise.google/policies/#DisableScreenshots) enterprise policy disables screenshot capture or Data Loss Prevention (DLP) rules apply, returning the error `Screenshot capture is restricted by policy`. Developers can handle attach rejections gracefully or use higher-level APIs like [`chrome.scripting`](https://developer.chrome.com/docs/extensions/reference/api/scripting) and [`chrome.declarativeNetRequest`](https://developer.chrome.com/docs/extensions/reference/api/declarativeNetRequest) that support granular origin permissions in restricted enterprise environments.

Standards & signals

View on chromestatus.com