PHP Debugger ? Which one

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
talktodale
Forum Newbie
Posts: 2
Joined: Thu Jun 07, 2012 2:26 pm

PHP Debugger ? Which one

Post by talktodale »

I am using Apache, PHP version 5.4 and I would like some recommendations on a debugger. Just getting started with PHP but not new to development.

I read about Eclipse, Xdebugger, Zend, Firebug but it's all kind of fuzzy still as to which one would be easiest to install and get going. I just want to start.
I just want to step through some code with a debugger.

Can you recommend what you use ??? :banghead:
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: PHP Debugger ? Which one

Post by Celauran »

Xdebug is great and dead simple to install. Integrates nicely with Netbeans, too.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: PHP Debugger ? Which one

Post by Christopher »

I think xdebug is the most commonly used for PHP and it's free. You need to configure PHP with it installed. It works with IDEs like Eclipse. Firebug is a browser extension for developers that helps debug Javascript (among many other things).
(#10850)
talktodale
Forum Newbie
Posts: 2
Joined: Thu Jun 07, 2012 2:26 pm

Re: PHP Debugger ? Which one

Post by talktodale »

These are great comments... so Net Beans is an alternate IDE but using Eclipse and xdebug is the right way to go ? I did not know firebug was primarially for Javascript and didn't include
PHP debugging so I still have a lot to learn.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: PHP Debugger ? Which one

Post by Celauran »

There is no 'right way'. Eclipse and NetBeans are both IDEs. Which you use is a matter of personal preference. Xdebug is a standalone product that integrates with both.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: PHP Debugger ? Which one

Post by Christopher »

To me more specific, xdebug runs inside PHP on the server and makes data available to applications. NetBeans and Eclipse are editors that have extensions that can read xdebug data. Firebug runs in the browser and I recall also makes data available that IDEs can use.

And for the record, editors are completely personal preference. There are many, many great editors out there -- most are free. One person's worst editor is another person's favorite editor. So better and worse have little meaning when discussing them. The only objective part are features.
(#10850)
Post Reply