Blog Post RSS ?

Blogs » PHP » Debugging PHP
 

Debugging PHP

by Troels Knak-Nielsen

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.

Screenshot of Spectator

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.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Ping.fm
  • Twitthis

Related posts:

  1. PHP Support in NetBeans 6.5 Long dismissed as a "toy Java IDE", NetBeans - Sun's...
  2. PHP Framework Plans Socially Responsible Coding Contest The Symfony PHP framework is planning a 48-hour programming competition...
  3. Introducing php-tracer-weaver php-tracer-weaver is a tool for automatically generating docblock comments, with...
  4. 16 PHP Frameworks To Consider For Your Next Project Why spend valuable time coding everything by hand? Using a...
  5. How to Install PHP 5.3 on Windows PHP 5.3 is the most significant update since version 5.0....

This post has 8 responses so far

Sponsored Links

SitePoint Marketplace

Buy and sell Websites, templates, domain names, hosting, graphics and more.

Follow SitePoint on...