The following API modules provide partial interfaces to developer tools to enable you to extend developer tools.
- devtools.inspectedWindow
- devtools.network
- devtools.panels
How do I use the DevTools APIs
-
- Specify “devtools_page” in the manifest of the extension:
{ "name": ... "Version" : "1.0", "minimum_chrome_version" : "10.0", "devtools_page:" * * "devtools. HTML" * *,... }Copy the code
-
- Once the developer tools window opens, an instance of the devTools_page item in the MANIFEST is created. This page can be used to add additional extension pages, such as panels or sidebars, to the developer tools window by using DevTools. panels.
-
- Chrome’s DevTools.* API module only works with pages loaded in developer tools Windows. Content Scripts and other extension pages cannot use these interfaces. As such, the module is only available during the life of the developer’s tool window.
-
- The interfaces available for extension pages in the developer tools window include all of the DevTools modules and the Chrome.Extension API listed above. The other extension apis are not available on the developer tools page; you can invoke them by sending a request in the extension’s background page, similar to what you would call in Content Scripts.
-
- There are also developer tool apis that are still in the experimental stage. You can get a list of these APIs and learn how to use them through the Chrome.experimental.* APIs.
-
6. Feedback! Your comments and suggestions will help us improve these apis.
For more information
To learn more about the standard APIs that extensions can use, visit chrome.* APIs and Other APIs.
The sample
You can find examples using the developer tools API through Samples.