petejkim/autoparts

Add XDebug Part for PHP Debugging

Opened this issue · 1 comments

I would like to use Nitrous as a replacement to my local LAMP stack for PHP development. To do this, I need to be able to use XDebug. Is this possible?

I see they added it in codio: codio#67

In Nitrous, you can currently install xdebug by running:

# pecl install xdebug

Then, you need to add the extension to your php.ini:

zend_extension=xdebug.so

Then, if you were trying to use it with phpunit for example, you can tell phpunit to use your php.ini file:

# php -c /home/action/.parts/etc/php5/php.ini' `which phpunit` --coverage-html=web/cov -c app

You can ease the use of these by putting them in your .bashrc or .bash_profile:

alias php='php -c /home/action/.parts/etc/php5/php.ini'
alias phpunit='php `which phpunit`'

Then it's just

# phpunit --coverage-html=web/cov -c app

Bam!