How to debug firefox plugin? - firefox

I'm writing plugin for firefox and I need a way to debug it. Plugin written in javascript.
So is there is a elegant way how I can debug it?
Update 2014: There's a builtin Firefox debugger

The Mozilla Developer Center has plenty of useful information on this topic (as well as many others).
I would recommend Setting up an extension development environment as a good place to start.

You can use Firebug or Venkman's Javascript Debugger.

Chromebug is a useful tool which allows JavaScript debugging and inspecting XUL elements. You can take a look at a few screenshots here.

Related

Debugging javascript web page running on windows application

Do we have any way to debug javascript pages integrated into a windows application?
Currently, we have F12 IEChooser by Microsoft, but that is outdated. It's not so comfortable for debugging. Breakpoints don't work often.
I know we have EdgeHTML, I've tried installing this, But I didn't find a way to debug javascript code running in windows application. We have something called script attacher, that's how we used F12 to debug the same.
Any help would be greatly appreciated.
There's a neatly written blog post on this. Looks like this is what you asked for.
https://weblog.west-wind.com/posts/2017/jul/06/javascript-debugging-in-a-web-browser-control-with-visual-studio

Dojo firebug in Firefox 6

I recently started using the Dojo firebug extension. I had gotten used to it since it had some nice features (letting you see dojo on the widget level). This was good for me because I am in the process of trying to learn dojo so this really let me see how stuff worked together.
My question is, has anyone found any solutions to get the Dojo firebug extension working in Firefox 6 or should I just try downgrading to FF5?
Thanks
UPDATE:
I tried a workaround I found somewhere else. It said to use the Firefox nightly build add-on, and that add-on would allow me to override the version compatibility. I tried that and it still didn't work.
I recommend trying the Add-on Compatibility Reporter extension from Mozilla. This extension (besides letting you report incompatible add-ons) lets you completely disable version checking.
It's a great way to ensure that older extensions still work when Firefox upgrades the browser every week. Now, this assumes that the issue is with version compatibility, and not that the plugin is actually broken! If it's the latter, there's not much else you can do.
(Also, that's an awesome plugin. I'm definitely going to try it out myself here shortly!)

Alternative to Firebug for Firefox?

The latest versions of Firebug in Firefox feel like they've been regressing. Performance is abysmal. This is a common complaint amongs everyone on my team, and increasingly among many other web developers online.
Are there any alternative extensions for Firefox that gives similar functionality(DOM inspector, Net tab, console)?
Firefox now has built in developer tools similar to Firebug, but not so full-featured:
https://www.mozilla.org/en-US/firefox/technology/
http://www.webmonkey.com/2011/12/an-overview-of-firefoxs-coming-developer-tools/
Fidler Web Debugger is an option, although it's not as integrated.
Other alternatives include:
Jash: Javascript Shell
Internet Explorer Developer Tools
FireAtlas (extension to FireBug, but helps debug ASP.NET)
The IE8 Debugger is pretty good, for IE. They seemingly took several cues from Firebug.
I agree with you as far as Firebug's performance goes in recent releases, therefore I have found myself using the excellent WebKit Inspector - in both Chrome and Safari - and Opera Dragonfly a lot more recently.
If you were to post your specific problems about Firebug performance to the Firebug newsgroup or bug list, then we'd just fix them. No one has ever complained about performance. We had some problems with memory but these were fixed.
jjb
For Http/Https traffic inspection HttpFox is very great tool. u'll get an add-on for firefox in the web. However it doesn't have the cool dom inspection feature of firebug.
Check out
Dung Beetle
Also, exclusively for XPath expressions, but pretty fast,
XPath Checker

monitor traffic to and from my pc

I want to see each url request made my by browser.
I want to see the url requests made by ajax.
Which software should I use? Some java code would also help.
You can use Fiddler or if you need to "go deep" (as their web page says), you can use Wireshark.
Firefox has a great plugin called LiveHTTPHeaders that I think will get you what you are looking for. I'm not positive on the AJAX part of the question, but it's worth a shot. I consider LiveHTTPHeaders to be an indispensable tool for anyone doing web development.
Use Firebug
(source: getfirebug.com)
Otherwise use Wireshark http://www.wireshark.org/ if you want the swiss army knife of network capture tools.
There are lots of great programs out there that will do this. My answer would really depend on what you are trying to do.
Adding an HTTP proxy that logs requests will easily do the job.
You can also leverage browser plugins such as FireBug and Google's Page Speed to see the requests fly in realtime.
Jacob
I don't really understand where do you want to see the traffic. But if what you mean is browser and if you are using Firefox then Firebug will come handy.
So many great extensions for Firefox that'll give you that info:
Firebug
PageSpeed
LiveHTTPHeaders
You could also try using the developer tools in Safari or Chrome if you're not a Firefox fan.
If you use IE... why are you using IE? ;-)
Any personal proxy will do. Fiddler was already suggested.
For Firefox I would use the TamperData plugin.

What programming language is required to create a Firefox plugin?

What are the minimum programming requirements to create a Firefox plugin?
You need to learn XUL for the UI and Javascript for the programming.
more infos here:
https://developer.mozilla.org/En/Developing_add-ons
Firefox plugins (such as things like Flash player) are binary components you develop in NPAPI the cross-browser API for plugins.
Check out Mozilla Plugin Developer Center
You might also look into Firefox Extensions sometimes Firefox plugins are shipped as extensions. Firefox extensions modify or enhance the functionality of the browser itself. Javascript is primarily the language you'll be writing a Firefox plugin.
Check out the Mozilla Extensions Developer Center
Some Firefox plugins that come in handy when developing Firefox plugins are the Venkman Javascript Debugger and Firebug Javascript debugger
If you are into an organized style of reading, and prefer an good ol' book, start here.
http://www.amazon.com/Programming-Firefox-Building-Internet-Applications/dp/0596102437
It will get you started on the basics on XUL, which is in turn used to build the addons. If you have a touch in javascript, it will definitely help you.
Else,
Start here.
https://developer.mozilla.org/En
You can start learning what all you will need to start developing firefox addons, or even firefox itself.
If you are fairly proficient in Javascript and DOM, then, just jump here.
https://developer.mozilla.org/En/Developing_add-ons.
The only problem might be, they are as not comprehensive for a newbie programmer. If you have some professional background in programming, and can pick up a language from sample codes, then start here.
But I would definitely suggest a well organized book, like I mentioned above. There are very few XUL book in the market, this was my first google result, so just linked it here.
Search for XUL on http://www.amazon.com/.Choose one, atleast a book published after 2006-07.
[edit]
Just found out this good article
http://kb.mozillazine.org/Getting_started_with_extension_development
There seems to be a huge misunderstanding here; Are you trying to create a plugin or an extension? As Dougnukem stated, plugins have nothing to do with XUL or extensions. They are shared libraries (.dll, .so, or .dylib for win, linux, mac) that provide functionality that the browser isn't capable of alone.
If you're just getting started, I'd recommend looking at the FireBreath plugin framework and reading through some documentation. A decent place to start is: http://colonelpanic.net/2009/03/building-a-firefox-plugin-part-one/
Also, you still haven't selected an answer for this question; is that because you haven't found an answer yet, or because you've forgotten?
Advanced DOM, the Firefox API

Resources