How to install and configure xdebug in Linux Mint 18?

2.6k Views Asked by At

I am using the Netbeans IDE, PHP version 7.0 and I have already installed Apache version 2.4.18 and Linux Mint 18.

I have also tried to install the debug files with

sudo apt-get install php7.0-xdebug

How can I proceed further?

1

There are 1 best solutions below

1
jaskarn On

Download last stable release of xdebug 2.6.0 :

wget -c "http://xdebug.org/files/xdebug-2.6.0.tgz"

Extract file :

tar -xf xdebug-2.6.0.tgz

cd xdebug-2.6.0/

Build extension

phpize
./configure
make && make install

after finshed compiling i found the binary on path; /usr/lib/php/20151012/xdebug.so

for find xdebug.so use this comand :

pwd -L  xdebug

it print out : /etc/php/7.0/mods-available

then go in directory /etc/php/7.0/mods-available and edit file as superuser nano xdebug.ini file add follows lines:

zend_extension=/usr/lib/php/20151012/xdebug.so
  xdebug.show_error_trace = 1
  xdebug.remote_enable=1
  xdebug.remote_port=9000
  xdebug.profiler_enable=1

sudo systemctl restart apache2.service or sudo /etc/init.d/apache2 restart

http://wiki.netbeans.org/HowToConfigureXDebug