Jump to content
Sign in to follow this  
  • entries
    53
  • comments
    56
  • views
    33819

"Human sacrifice, dogs and cats living together -

Sign in to follow this  
aidan_walsh

404 views

As seen in the last part of this little series, I have decided to take a peek at Firefox XUL programing, and was having a little fun with getting to grips with the Venkman debugger. I had just gotten to know the layout, so now it was time to get into the flesh of it.

Getting Venkman to peek at Extension scripts
So, now I had a fair idea of how I have to go about getting things done, it wass time to get at it. Browse down through the loaded scripts and, oh... No sign of the extension's script.

Right, up to File, Open Web Location, chrome://foo/bar.js, set the breakpoint I want to look at, and off we go. Except we don't. Hmm, why did you skip the breakpoint, Venkman?

What I found interesting (read disappointing) was the seeming inability Venkman has of being able to determine that a script that has been added as part of an extension, as opposed one which is a part of the program. The only way it seems to be able to tell that a script is not intrinsically part of the browser is if its embedded or linked to in the webpage we are looking at. Perhaps this is down to the fact that Gecko considers all extension scripts to be merges with its own code.

So it transpires that opening the script on its own was unnecessary, but in order to be able to see my extension scripts I had to enable Venkman to see the browser files (Debug, unchecking Exclude Browser Files), and then I would have to sit through any errors that may have been thrown by the application, regardsless of whether they are related or not. This is somewhat unusual, especially in the context of any other development envoirnment I have come across. But still, perhaps this is a limitation of the technology that I have to live with for the time being, until some clever chap changes Venkman to pick out extension code and show it in its own context.

Getting Venkman to play fair
As unusual as it was to have my development envoirnment debugging itself, it was also a pain in the arse. It got to the point that even trying to pause the flow resulted in Venkman debugging itself, trying to step me through the code of pausing the flow. Telling the debugger to ignore that script did nothing, as it prefered to ignore me. Each and everytime I hit the Pause button, button.xml wanted attention. And when I hit continue, that would look for attention too... Grr...

Still, it wasn't a fatal problem. I was still able to set break points and continue along. I noticed that contrary to what I understood from Svend Tofte's tutorial, I didn't in fact need to keep hitting the Pause button to debug, and break points would halt automatically as I would expect them to.

Well, I admit it wasn't the Twelve Trials of Hercules...
So there it is. One man's struggle to get to grips with the idiosyncrasies of a somewhat underdeveloped development envoirnment. All in all, Firefox doesn't really prove itself the best platform for development of itself, though it can be tailored and tweaked to be better.

I find it a little unfortunate that it was so difficult to initially get to grips with Venkman (Bill Murray was more fun). The biggest problem of self debugging seems to be tied to the limitation of the Gecko's extension implementation, though I'm sure someone will find a way to seperate the add-in from the base one of these days. But in the mean time it will just have to do, I guess...

Now, back to the Gecko reference guide...
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!