Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License, and code samples are licensed under the BSD License.
©2012 Google
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.
Attaches debugger to the given target.
If you specify the callback parameter, it should specify a function that looks like this:
function() {...};
Detaches debugger from the given target.
If you specify the callback parameter, it should specify a function that looks like this:
function() {...};
Sends given command to the debugging target.
If you specify the callback parameter, it should specify a function that looks like this:
function(object result) {...};
Fired whenever debugging target issues instrumentation event.
Fired when browser terminates debugging session for the tab. This happens when either the tab is being closed or Chrome DevTools is being invoked for the attached tab.