
While extensions have similar capabilities as web pages they often need permission to use certain features, such as cookies, storage and Cross-Origin XMLHttpRequests. It will reload the popup without closing the DevTools panel.

To view these requests, refresh from inside the network panel. The popup will often make all of the required network requests before even the speediest of developers can open DevTools. Logs for extension pages displayed as a tab, such as override pages and full-page options, can be found in the web page console and on the extensions management page. backgroundColor = "' + color + '" # Extension tabs Correct the injected script to pass the color variable into the code. The extension must not be passing the variable correctly. To use DevTools from within the content script, click the dropdown arrow next to top and select the extension. Only runtime errors, console.warning and console.error will be recorded on the Extensions Management Page. Open the DevTools panel of the web page the extension is trying to alter. The likely culprit is the content script, which runs inside the web page. nope, the background still hasn't changed colors! Navigate back to the Extensions Management Page and. Refresh the page, open the popup and click the green box. Update the code, click the Clear all button in the upper right hand corner, and then reload the extension. addListener ( function ( ) = await chrome. Uncaught TypeError: Cannot read property 'addListener' of undefinedĪdditionally, the Chrome DevTools panel can be opened for the background script by selecting the blue link next to Inspect views.

The extensions system has found an issue in the background script. After the extension is loaded, it should have three buttons: Details, Remove and Errors in red letters.Ĭlick the Errors button to view the error log. Click the Load Unpacked button and select the broken extension directory. Navigate to the chrome extensions management page at chrome://extensions and ensure developer mode is on.

Download a broken extension here to begin locating error logs for different extension components.

# Locate the logsĮxtensions are made of many different components, and these components have individual responsibilities. This tutorial gives developers a basic understanding of debugging extensions. Becoming a master extension debugger requires an understanding of these behaviors, how extension components work with each other, and where to corner bugs. Extensions are able to leverage the same debugging benefits Chrome DevTools provides for web pages, but they carry unique behavior properties.
