I just checked in a little project, I’ve been working on for the last couple of weeks.
It really begun at the last Copenhagen php-meetup; Joakim Nygård and Jacob Oettinger made a presentation of their project, WebCacheGrind. I casually mentioned something about having played with the dbgp-protocol (The debugging part of Xdebug) and that it ought to be simple enough to write a fontend for it. That prompted some snickering from the back row. Apparently some guys had this rule at their workingplace, that whomever said that something ought to be easy to do, had to do so himself. Not an unreasonable rule, I suppose. Obviously, I couldn’t let that go unattended, so I gave it a shot.
Spectator is a XUL application, which should make it cross platform. I have tinkered a bit with XUL before, but not a full application. If you’re wondering what XUL is, it’s the GUI toolkit, in which the frontends for Firefox and Thunderbird are written. It’s a markup language — much like HTML, which can be scripted with Javascript. This makes it very easy to work with. The only problem seems to be a rather lacking documentation, but a bit of detective work got me through that.
So what can spectator do? Mind that this is a first version and I really just meant it as a proof of concept. I think I got a bit further than that, but it probably still has a few bugs. Still, with the current version, you can step through a program, set breakpoints and inspect the stack. Really all you would expect from a debugger.
Of course, as some of you might point out, there are already other implementations available. Most notably Komodo, which is also implemented with XUL. However, these implementations are proprietary, and are integrated with an IDE, that you may not want to use. Spectator is an open source alternative and is IDE/editor agnostic.







June 2nd, 2008 at 5:50 pm
You do know that Komodo is going “open source” for their next major upgrade:
http://www.openkomodo.com/
Not that it deminises the usefulness of a KISS xdebug frontend in XUL at all. But something to aware of ..
June 2nd, 2008 at 6:42 pm
Great work. I’ve been looking for a no-nonsense cross platform app to debug my php code on. Just to let you know I have also run it successully on Windows using the XULRunner that is part of Firefox 3:
e.g.
firefox.exe -app path\to\spectator\xul\application.ini
Thanks!
June 2nd, 2008 at 7:18 pm
Looks interesting! Since it’s based on XUL, perhaps it can be integrated with Open Komodo which is an open source text editor / IDE also based on XUL?
June 2nd, 2008 at 9:00 pm
Works like a charm on Mac OS X (10.5.3). Looks as ugly as an XUL app, but works really great! Fantastic work!
June 2nd, 2008 at 9:07 pm
Yes, I suppose it could. The model layer libraries are independent of the presentation layer, so you could reuse these in Komodo. I don’t have much incentive for doing so though, since I prefer to use a stand-alone editor (Mostly Emacs). There are obviously some benefit to have editor and debugger integrated, but I don’t think it’s much of a problem to have the two running separately.
June 4th, 2008 at 12:58 am
Hey, that’s awesome – I’m surprised you followed through, since that rule only really applies to employees ;)
July 28th, 2008 at 11:42 pm
Why not make this a Firebug extension..? :)