Blue Static

Archive for the ‘MacGDBp’ tag

The Road to MacGDBp, Part I

Posted on June 2, 2008 at 21:33 UTC, filed under the category Uncategorized. Tags: debugging, MacGDBp, PHP,

Inmy last pipeline update, I said that MacGDBp would be out by May. Unfortunately, I’ve run into two bugs that I’m not quite sure how to work around. One of them involves NSXMLDocument raising assert() messages for what appears to be valid XML. Weird, right? So instead, I’m going to write an article about MacGDBp in hopes of whetting your appetite for it until it’s done.

History

The idea for MacGDBp has been in my head for a long time. PHP debuggers are far superior to var_dump() and print_f() debugging statements. Unfortunately, only the Zend IDE was available — but it cost money and was ugly (i.e., not Mac-esque). Next came Eclipse with the web tool kit. I had a heck of a time getting the debugger to work and ultimately gave up. Additionally, it too was ugly. So I put up with my combination of BBEdit (and later TextMate) and var_dump()/print_f().

Fast forward a few years to the introduction of the Xdebug extension. This extension is absolutely fantastic, if only for the stack traces in errors and uncaught exceptions. But it also has a remote debugging function. For about a month, I used the packaged command-line demonstration tool and read XML to glean debugging information. Then at the end of July/beginning of August 2007, I made the decision to write a native Mac application for the Xdebug remote debugger.

Evolution of Design

It’s rare for me to design an application without first sketching out the interface on paper. But because this was such a straight forward project, I decided to wing it. The second commit in the git repository was “Laying out an unhooked basic interface for the system.” This was the first revision.

Yes, ugly. But it improved after some tinkering:

Then I realized that I was trying to re-invent something that had already been well-designed. So with the next iteration, I mocked up Xcode’s debugging window.

After designing a couple of toolbar icons, we get to the final design. This is how the application will look when launched and unconnected to Xdebug:

And there you have the final design. In the next couple of days I’ll talk about how I designed the icon in an effort to stall while I squash the last few bugs.

A Note about System Requirements

MacGDBp will require 10.5. And this is not because I don’t want 10.4 support, but MacGDBp relies on a bug that was fixed in 10.5. In Mac OS X, there is a class called NSTreeController that I use for the variable list. But under 10.4, parts of this class were not properly exposed and were very buggy. I found a work-around, but it relied on using private, undocumented API calls. In 10.5, Apple fixed the bug and exposed the necessary parts.

Pipeline Update 1

Posted on April 19, 2008 at 16:38 UTC, filed under the category Uncategorized. Tags: MacGDBp, mkrcpt, pipeline,

Two months ago I gave an update on my entire timeline of projects. This will just be a quick rundown of the projects and their status.

mkrcpt: Shelved, probably indefinitely. It turned out to just not be that useful. I’ll push the git repository in the near future, however. But this will not be officially released or supported.

MacGDBp: The icon is done as is the line numbering in the source view. I’m now just fixing some bugs and finishing off the breakpoint manager. This should be out the door by the end of May! As this comes near completion, I’ll hopefully start drumming up interest in it. Stay tuned for more information.

CMS: This is almost done as well. There are a few more modules I need to write, but the architecture that I’ve already written will make that quite simple.

All the other projects are at the state detailed in the last pipeline update. But this is progress, at least!

On Pipelines, Expansive

Posted on February 28, 2008 at 20:59 UTC, filed under the category Uncategorized. Tags: Bugdar, free time, ISSO, MacGDBp, mkrcpt, MyWishlist, NewzGrab, pipeline, WebFreeChart,

It’s time to talk pipelines. Initially, I was going to talk timelines. But timelines have the problem of addressing time, which is very difficult when you have 40+ hours of activities and school to do during the week. So, pipelines.

I’d like to start by announcing the completion of ISSO3. I’ll go into the details of why it took so incredibly long to finish in a future post, but you should know that it is finally done. What does the completion of ISSO3 mean? It means that all PHP projects can now resume development and use this framework. ISSO3 also requires PHP 5.2, which means that any future major releases of PHP projects will require PHP5.

That’s one less thing in the pipeline!

But what else is in this (expansive) pipeline? (Note: This is roughly in order of when the items will be finished. I very may well skip around and work on various projects when I feel like it, but this order is based on how much work is done versus how much has to be done).

mkrcpt

I compile a lot of open source projects myself rather than using ports or fink. Many people are familiar with the make; make install process. One of the problems with make, though, is that there’s no uninstaller. This to me is a problem. So I decided to solve said problem. Enter two very small C programs: mkrcpt and unrcpt. Instead of typing make install, you would invoke mkrcpt. What mkrcpt does is it index all of the items in the installation path by last modified date, then runs make install for you, and reruns the index algorithm. It then stores all the changed files in a receipt file. If you ever want to uninstall a program, just run unrcpt.

What’s left: Testing and a few fixes to the receipt file format.

MacGDBp

PHP developers have access to a really cool extension called Xdebug that has remote debugging functionality via a protocol called GDBp. Both Windows and Linux have GUI clients for this protocol, but the Mac does not. The lack of a client irked me because the functionality is quite helpful.

What’s left : The basic functionality is all done, but there’s still a bit left to do to make it useable. Those items are: adding line numbers to source views, adding breakpoints (currently you use the xdebug_break() function in your code), and making an icon.

CMS

No, I’m not writing another CMS solution to compete with Joomla, ExpressionEngine, etc.. This is a private project for my university’s TV station. The website is going to be completely redone to allow for modular content blocks and dynamic templates. The project looks fairly straightforward, so it shouldn’t block things in the pipeline.

What’s left: I haven’t started writing a single line of code yet, but it’s completely planned out.

Bugdar 2

I am very excited about working on Bugdar 2, but as you can see, there are a lot of things in the pipeline. I’ll post more about this as the pipeline start’s clearing up and work begins.

What’s left: Everything.

NewzGrab

This is another Mac app that will take in Newzbin (.nzb) files and download them from your favorite NNTP server. I’ve only mapped out the classes and hand-drawn a mockup interface. More on this will be posted as work commences.

What’s left: Everything.

MyWishlist

A while ago I had a project called MyWishlist that allowed you to setup a wishlist site for you and your friends/family. I won’t go into the details here, but I’m rewriting it to be a hosted application as opposed to a downloaded one. Don’t expect it anytime soon because it’s a very low-priority item.

What’s left: Deciding what language to write it in. Ruby? PHP? Python? Who knows?!

WebFreeChart

This is a PHP5 OOP charting library. It’s boring to work on. But I need it. It’ll happen… eventually.

What’s left: Almost everything.

So, the above is a list of all the projects I’m juggling. It’s a lot. There is no timeline as to when things will be done. I wish I could give one, but with the amount of Real Life ™ things I have to do, I just work when I’m not tired, I’m in the mood, and I have free time. If those three stars align, progress gets made. I’ll keep you guys updated on any major developments. Your patience is appreciated.

Newer Entries »