Tag Archives: xdebug

xdebug no longer working after php upgrade [SOLVED]

I recently upgraded php to version 5.4.6 and my debugging with vim and xdebug got broken with no visible error message. I found out that xdebug was not correctly updated. “cat /etc/php5/conf.d/20-xdebug.ini” reveals following content: zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so A quick “ls /usr/lib/php5” returns the following: 20100525+lfs  libexec  maxlifetim Conclusion: xdebug.ini is pointing to a no-longer existing folder. Solution Uninstalling php5-xdebug and reinstalling it did not solve the issue. Simply manually edit the 20-xdebug.ini file to point towards correct folder, in that case: zend_extension=/usr/lib/php5/20100525+lfs/xdebug.so  

Enable debugging in php

Installation Below are great tutorials on how to enable php debugging with vim and xdebug: https://mutelight.org/minimal-guide-to-debugging-php-with-xdebug-and-vim http://www.weberp.org/forum/archive/index.php/thread-9.html In a nutshell: sudo apt-get install vim php5-xdebug sudo vi /etc/php5/conf.d/xdebug.ini and append below content: xdebug.remote_enable=1 xdebug.remote_host=localhost xdebug.remote_port=9000 xdebug.remote_autostart=1 Note: remove last line when in production, it’s pupose is to avoid having to run ?XDEBUG_SESSION_START=1 before debugging sudo apache2ctl restart download debugger.tar.gz from above link mkdir -p ~/.vim/plugin cd ~/.vim/plugin ; tar -xzf <path_to_debugger.tar.gz_file> Vim usage To learn how to use vim, open a shell and run ‘vimtutor’ to go through the tutorial! Vim debugging tips Once vim and xdebug are working together […]