autoparts icon indicating copy to clipboard operation
autoparts copied to clipboard

Add XDebug Part for PHP Debugging

Open taras opened this issue 10 years ago • 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?

taras avatar May 11 '14 15:05 taras

I see they added it in codio: https://github.com/codio/boxparts/issues/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!

amsross avatar May 23 '14 20:05 amsross