Xdebug for Fedora with PHP 5.3

In February I wrote a guide on setting up Xdebug for Eclipse usage under Ubuntu. Using a neat debugger while exploring an existing WordPress project is a must and among the two possibilities (the Zend one or Xdebug) I use Xdebug. However, setting it up on my ThinkPad took a bit more time due to the different configuration. Basically the installation process and the Eclipse configuration is all the same - install php-devel and pecl and then proceed with xdebug install, configure Eclipse further. However, adding the Xdebug support for the PHP has several differences to be taken into account.… Continue Reading

Profile with Cachegrind

When it comes to larger projects than yet another WordPress blog, refactoring and additional memory optimization are required to move the project in the right direction. Cachegrind is a GPL profiler for applications. It simulates how the program interacts with the architecture - including cache layers from the standard configuration of the modern systems and the CPU cache types that are normally presented. This allows for profiling applications on a lower level, including: the time for calling a function/initializing an object/etc the number of calls for a given function stacktrace of calls And much more. In essence, it's a visual… Continue Reading

Xdebug on Ubuntu for WordPress

Turns out enabling Xdebug on Ubuntu for Eclipse PDT is easier than doing the same on Windows. The short version is installing the module as per this tutorial - http://ubuntuforums.org/showthread.php?t=525257 [bash] sudo apt-get install php5-dev php-pear sudo pecl install xdebug sudo updatedb locate xdebug (this one finds the xdebug path) sudo gedit /etc/php/apache2/php.ini [/bash] Adding this line (/w the path): [bash] zend_extension="/usr/lib/php5/20060613/xdebug.so" sudo /etc/init.d/apache2 restart (or sudo apache2ctl restart) [/bash] This install the xDebug and enables it. Then we need to add a few more lines of code in /etc/php5/apache2/php.ini (as in here): http://holisticsecurity.wordpress.com/2011/07/04/php-xdebug-xampp-win32/ [bash] xdebug.auto_trace = 0 xdebug.collect_includes =… Continue Reading