|
Web Contractors Web Developer Jobs Join Us / Log in Discussion |
Installing a PHP Debugger
Here's a brief rundown on how to install your favourite Debugger for PHP. This assumes you already have php installed on your system and you're familiar with programming PHP.
There are two PHP Debuggers easily available. These are XDebug and The Zend Debugger. Which debugger is right for you? Don't ask me! Both run with Eclipse and xDebug runs with the Komodo IDE.
You can only run one PHP debugger!
It's handy to have a php info page displaying somewhere on your local machine so you can check where your extensions and php.ini file live.
Using PHP from the command line you can find your php.ini file like this:
php -r 'phpinfo();' | grep php.ini
You find your extensions directory like this:
php -r 'phpinfo();' | grep extension_dir
Installing XDebug
- Download Xdebug here or here if you are looking for the Mac OS x version.
- Place the extension in your extensions directory.
-
Next, you'll need to enable the xDebug extension in your php.ini file by telling php where the file is. This means adding the line below to your file and restarting The Apache Web Server.
On windows it's probably:
zend_extension_ts="c:\php\ext\php_xdebug-2.0.1-5.2.1.dll"
On Mac OS X or Linux it's probably:
zend_extension="/usr/lib/apache2/modules/xdebug.so"If your on windows, see below for Thread Safe option which you may need.
- Check that you have the extension by running phpinfo(); or typing php -m at the command line.
Installing The Zend Debugger
- Firstly, download the Zend Debugger here.
- In your extensions directory stick your ZendDebugger.so or ZendDebugger.dll file. See above on how to find your extensions directory.
-
In your php.ini file place the line:
zend_extension = ”full path to ZendDebugger.so or .dll"If your on windows, see below for Thread Safe option which you may need.
- Next restart your Apache server and check your php.info file to see you extension loaded.
PHP on Windows
You may need Threadsafe extension on Windows. This is appended with '_ts' like so: 'zend_extension_ts'. To check if you need the Threadsafe version look for the text "Thread Safety" in your phpinfo().
PHP on Mac OS X
If you're on Mac OS X you may need to upgrade your version of PHP to work with some IDEs like Komodo. See:
http://www.entropy.ch/software/macosx/php/
http://www.entropy.ch/phpbb2
http://developer.apple.com/mac/articles/internet/phpeasyway.html
http://developer.apple.com/internet/opensource/php.html
New forum topics
- Open Source Online Invoicing Software
- Professional Drupal Consulting, Design & Development Services in Australia
- New Year Speacial-Professional Website for 400$ with doamin+Host
- Ruby on Rails Oceana
- WebDev/Design/Research/Consultant - PHP/MySql, Javascript, Joomla, HTML, Flash, AJAX
- Freelance ASP.NET Developer
- System Monitoring with Nagios
- Learning Ruby? What about the RubyMentor Project?
- Need a team
- JAOO Sydney/Brisbane 2009
- Get Your Business a Website for $399 ONLY !!!
- Concrete5: Another CMS!
- Manage The Cloud with Amazon Web Services
- Crystal Reports developer needed
- web applications/ e-commerce/ web marketing


Post new comment