PHP Debugging

Posted by Bob Porter on Geeks with Blogs See other posts from Geeks with Blogs or by Bob Porter
Published on Mon, 24 Jun 2013 17:08:34 GMT Indexed on 2013/06/25 4:22 UTC
Read the original article Hit count: 216

Filed under:

Originally posted on: http://geekswithblogs.net/blogofbob/archive/2013/06/25/php-debugging.aspx

I have been experimenting setting up a PHP development environment. I have been trying on Windows, Linux (Ubuntu) and Mac OS X.

So far my favorite environment is on Mac OS X. I have tried a number of IDE's and debuggers as well. 

IDE's

  1. Eclipse with the PDT Add On
  2. The PDT version of Eclipse
  3. Aptana
  4. Zend
  5. Netbeans

 Debuggers

  1. Zend
  2. XDebug

So far the only environments that I could get running quickly were Zend and Netbeans. Eclipse is a nightmare of versions and capabilities. I could only get Eclipse working well on Windows. On Ubuntu I was able to get the debugger working once. Thats it, one session, then it never worked again.

I love the Zend tools and environment and it worked well everywhere I tried it, but it was beyond my budget. 

Aptana also worked best on Windows, on Mac OS X it was fragile and I never could get debugging to work. 

Netbeans worked first time, every time, every where. With one oddity, after several debugging sessions the debugger would refuse to connect. On every platform, I would end having to reboot to restore debugging, which would then work correctly for quite some time. I am sure I will discover that some process is hanging and there is a less intrusive way to clear the issue, but for now rebooting always works.

In a future post I will go over how exactly I set my environment up, for now I have decided to stay with OS X. By the way, I did NOT use MAMP or the Zend Server, I stuck with PHP compiled and built from source, as well as Apache and MySQL installed locally. I use Homebrew as a package manager for OS X. I tried PORT but did not like the fact I had to sudo all the time to use it, and it installed things in /opt which I was not used to. Homebrew does sandbox the apps but it is nice enough to symlink them to their "normal" locations usually in /usr/local. 

 

© Geeks with Blogs or respective owner