Debugger API serves as an alternate transport for Chrome's
remote debugging protocol. Use chrome.debugger
to attach to one or more tabs to instrument network interaction, debug
JavaScript, mutate the DOM and CSS, etc. Use the Debuggee tabId to target tabs
with sendCommand and route events by tabId
from onEvent callbacks.
As of today, attaching to the tab by means of the debugger API and using embedded Chrome DevTools with that tab are mutually exclusive. If user invokes Chrome DevTools while extension is attached to the tab, debugging session is terminated. Extension can re-establish it later.
You must declare the "debugger" permission in your extension's manifest to use this API.
{ "name": "My extension", ... "permissions": [ "debugger", ], ... }
You can find samples of this API in Samples.