The background script is like any other JavaScript code. You can debug it using same tools you debug other JavaScript code in Chrome.
To open the Chrome Developer Tools, go to chrome://extensions
, and turn on Developer mode:
Now you can debug any extension that have a background page or script. Just scroll to the extension you want to debug and click on the background page link to inspect it.
Tip: To reload the extension, you can press F5 inside the developer tools window. You can put breakpoints in the initialization code before reloading.
Tip: Right-clicking the extension action button and selecting "Manage extensions" will open chrome://extensions
page scrolled to that extension.