Oceanic
Oceanic

Reputation: 1458

Content script file not visible in addon debugger

I've created an addon using the addon SDK and installed it in Firefox (version 35.0.1). The addon has the following files -

In the main addon code I'm creating a panel, and the content script file is loaded using the contentScriptFile property of the panel. However when I launch the addon debugger, I'm able to see only the main.js script and not the content script. I've checked that the xpi file actually contains the content script file. So why isn't the debugger showing it?

Upvotes: 3

Views: 3414

Answers (3)

the8472
the8472

Reputation: 43052

Try using the browser toolbox or the browser content toolbox which is not scoped to a single addon.

Afaik the addon debugger only shows scripts running in the same compartment as the addon main, which may miss scripts running in sandboxes/other compartments.

Upvotes: 2

e-motiv
e-motiv

Reputation: 5893

I think I found it (using Firefox Developer Edition 42.0a2 though).

  1. Open the Default Web developer Tools (Ctrl+shift+I)
  2. Go to Settings (cog wheel top right)
  3. Enable "Advanced Settings" > "Enable worker debugging (in development)"
  4. Enable "Inspector" > "Show Browser styles" (for seeing your content style (files))
  5. Reload the page Screenshot

Upvotes: 2

ejectamenta
ejectamenta

Reputation: 1087

Its probably an error in your content script code that prevents the file from appearing in the debugger file list. I had this problem and it's difficult to find these errors as the Firefox error log often doesn't refer to the which file is in error or the line number. Check for unpaired braces that kind of thing

Upvotes: 1

Related Questions