I am developing my first add-on in Firefox. I could manage to use correctly content scripts and scripts inside a window I create from the popup — the one triggered by the browser-action button. Now I would like to use a script in background and I have a simple question:
When I write a statement such as :
console.log("Hi I am the background script!");
where can I see the result?
In other words, how to see what is happening in the background script? I have tried many consoles but nowhere I could see the greeting message.
I eventually found the answer. To open the console for background script, go to the page about:debugging. Once the addon is installed, click the inspect button. A new tab containing the console is opened.