Janinho67
Janinho67

Reputation: 145

debugging firefox extensions

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?

Upvotes: 0

Views: 1410

Answers (4)

Jon
Jon

Reputation: 7918

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.

Upvotes: 2

paa
paa

Reputation: 5054

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.

Upvotes: 0

Motti Strom
Motti Strom

Reputation: 2735

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?

Upvotes: 0

sh0ne
sh0ne

Reputation: 390

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

Upvotes: 0

Related Questions