Debugger API serves as an alternate transport for Chrome's remote debugging protocol. Use debugger to attach to a tab, instrument its network interaction, debug JavaScript, mutate page's DOM and CSS, etc.
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. The debugger API is currently experimental, so you must declare the "experimental" permission to use it as well.
{
"name": "My extension",
...
"permissions": [
"debugger",
"experimental"
],
...
}
You can find samples of this API in Samples.