Debugging PHP on a Mac with XDebug, Firefox and Netbeans

4

Posted on : 07-11-2009 | By : Brett | In : CodeIgniter, Mac, Netbeans, PHP, Programming

After nearly two months of using OS X, I think I have finally found my groove when it comes to doing my job. That is, writing code for websites, mainly in PHP.

For many years prior to using a Mac for PHP development, I had been using Windows or Linux and Zend Studio 5.x. When I was looking several months back for the Mac version download for my Zend Studio license, I was presented, instead, with a free upgrade to version 6. Wow, that was nice Zend! Unfortunately, the version I paid for (the “perpetual” license) was no longer there to download.

UPDATE: As of my last login to Zend, the 5.5.1 download was available. I installed and everything worked well. Still using Netbeans but appreciated all the same.

But hey! I got the brand-new version. That’s great right? Wrong! Zend decided to drink the Eclipse Kool Aid and completely changed an IDE that I had grown accustomed to (I guess it’s only fair to point out that Zend Studio 5.x was so old at this point that it was getting increasingly more difficult to install on more modern operating systems and newer java platforms.) In spite of the seemingly “over-bloat” of Zend Studio 6.0, I decided to give it a try. I must say that everything just felt wrong. Now I’m sure there are many PHP developers out there that have been using Eclipse for years and can’t live without it, but I just couldn’t seem to make it work my voodoo. I didn’t have the patience to get my Eclipse PHD, so I went looking elsewhere. That led me to a surprising alternative: Netbeans. Although very similar to Eclipse, an IDE with modules/plug-ins for multiple computer language support, Netbeans (entirely free) impressed me right on the spot. I know Zend Studio has all the same features more or less, but the way Netbeans is put together just seemed more natural to me (things I wanted to do actually worked.) Let it suffice to say that I have been using Netbeans since then and I haven’t looked back!

In this post, we will discover how to go about debugging a specific page in your website through setting up debugging in your MAMP stack, the free Netbeans IDE and your Firefox browser.

Read the rest of this entry »