Showing posts with label extension. Show all posts
Showing posts with label extension. Show all posts

Tuesday, June 12, 2007

Error console to help debugging process

- Firefox has a great built-in tool to help extension developers debug their codes, called the Error Console.
- I happened to stumble upon a problem with xmpp4moz, and Bard adviced me on enabling the Error Console.
- For more details, you can check out http://dev.hyperstruct.net/xmpp4moz/wiki/Report. Look up on how to enable chrome errors display in the console.

Setting up for FFox extension development

- create a project folder , somewhere, ex: C:\myext\ . This will be our root.
- inside it, we create another folder call chrome
- inside chrome, we create another folder called content, this is where we keep our .xul and .js files
- Now go back to root, create 2 text files, install.rdf and chrome.manifest
- for stuff to put inside install.rdf and chrome.manifest , and more details, you can check out FF extension tutorial @ MDC

- for development purposes, we don't need to create a .xpi package.
- to test whether our extension can be used or not, do this:
- go into your Firefox Profile's extension folder ex: C:\Documents and Settings\USER\Application Data\Mozilla\Firefox\Profiles\USER_PROFILE.default\extensions\
- create a text file, with your app id (the one you put in tag inside install.rdf) as its name. Just put the id, no .TXT or any other extension required.
- open the text file, put the path of your extension root folder, ex: C:\myext\ , don't forget the following '\'
- start Firefox and your app should run :D