0

I'm building an extension for Firefox. I've checked the javascripts and they work well. I've tried to make all the modules of the extensions right. But every time I try to install the plug-in into my firefox it says "Impossible to Install.. the component is damaged".

I'm looking for an "extension debugger" that can find the error that makes my add-on not working. Any advise?

C1pher
  • 1,933
  • 6
  • 33
  • 52
Janinho67
  • 145
  • 6
  • 17

4 Answers4

2

I was looking for a link to Firefox background page debugging. I found this link to Firefox debugging.

It says to follow these steps:

  • open Firefox
  • enter "about:debugging" in the URL bar
  • check the box labelled "Enable add-on debugging"
  • click the "Debug" button next to your extension
  • click "OK" in the warning dialog.
Jon
  • 7,848
  • 1
  • 40
  • 41
  • Note: if using Nightly, select `This Nightly` on the left after loading page for about:debugging. Then 'inspect' on the extension in question which invokes dev tools for said extension. – spaceshipdev Sep 27 '22 at 13:15
0

I don't think there is a dedicated debugger for that. Look at this article, maybe it can help: http://blogger.ziesemer.com/2007/10/javascript-debugging-in-firefox.html

Regards, Hiawatha

sh0ne
  • 390
  • 3
  • 16
0

There are some debuggers for Firefox extensions, inparticular Venkman and Chromebug (which only works reliably with Firefox v5).

These will be able to break (pause code execution and launch debugger) when an exception occurs but don't usually help when you've got packaging problems, which are often caused by

  1. Bad manifests - look though Mozilla's packaging documentation, in particular the format of manifests.
  2. Errors in XML - validate all XML files (such as install.rdf).
  3. Referenced files that are missing (e.g. a DTD referenced in the XML that is missing)

With the lack of tools, the best option is often to compare your extension's manifests and directory structure against a known good extension (e.g. an example Hello World extension, or an earlier version of your extension) as something as simple as a wrong entity in a DTD file can cause the error you are seeing.

Is this is a classic extension or the more recent bootstrapped type?

Motti Strom
  • 2,555
  • 1
  • 18
  • 15
  • it's a classic one. i don't know why but it looks like the former working one (i've just made a few adjustment) but now it works nothing. – Janinho67 Nov 13 '12 at 11:47
  • This answer is obsolete, see [my answer to a newer question](http://stackoverflow.com/questions/13701890/debugging-extension-code-in-firefox-javascript-debugger-venkman/17215664#17215664) explaining how to use the new inbuilt debugger to debug extensions. – Motti Strom Jun 20 '13 at 21:36
0

I would recommend to check the text encoding of install.rdf, chrome.manifest and bootstrap.js. Anything else than ANSI would be a cause of troubles.

paa
  • 5,048
  • 1
  • 18
  • 22