How to debug background.js in chrome extension/apps?

If you are a chrome apps / exten­sion devel­oper, at some point you will real­ize how do I debug the background.js. How do I open the con­sole for this application.

Chrome has the fol­low­ing flag

chrome://inspect
chrome://inspect/#apps
chrome://inspect/#extensions

It will list all the run­ning apps and exten­sion. For example,

  • Install the Google Keep from the web store.

https://chrome.google.com/webstore/detail/google-keep-notes-and-lis/hmjkmjkepdijhoojdojkdfohbdgmmhki

  • Launch the app

  • In a new chrome tab nav­i­gate to chrome://inspect/#apps and click inspect.

Now, you have your dev tools. It should look some­thing shown as below :

chrome-apps

If you want us to write more on debug­ging tools, leave your com­ments and we will get back to you as soon as we can.


You may also like...