Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xdebug with XAMPP in Ubuntu 14.04

Tags:

php

ubuntu

xdebug

System Configuration

Ubuntu 14.04

Xampp v 5.6.3

installed php5-dev after xampp on

sudo /opt/lampp/lampp start

now want to install Xdebug wihin xampp and I tried available 3 method but nothing is working out , please see the whole process.

1)Ubuntu software package

 sudo apt-get install php5-xdebug

command exceuted successfully but no such file in .usr/lib/php5/...

uninstalled

2)Tailored Installation Instructions

downloaded xdebug.tar.gz after checking with wizard

 ice@cold:~/Downloads/xdebug-2.2.6$ /usr/bin/phpize5 

/usr/bin/phpize5 Cannot find config.m4.
Make sure that you run '/usr/bin/phpize5' in the top level source directory of the module

also tried with phpize, /opt/lampp/bin/phpize but not working out

3)PECL Installation

before that let me check with pecl help version

PEAR Version: 1.9.4
PHP Version: 5.5.9-1ubuntu4.5 Zend Engine Version: 2.5.0
Running on: Linux ice-cold 3.13.0-39-generic #66-Ubuntu SMP Tue Oct 28 13:30:27 UTC 2014 x86_64

pecl install xdebug

...
...
Build process completed successfully
Installing '/usr/lib/php5/20121212/xdebug.so'
install ok: channel://pecl.php.net/xdebug-2.2.6
configuration option "php_ini" is not set to php.ini location
You should add "zend_extension=xdebug.so" to php.ini

executed completely

I can see the file

644 /usr/lib/php5/20121212/xdebug.so

added below line in /opt/lampp/etc/php.ini

[xdebug]
zend_extension="/usr/lib/php5/20121212/xdebug.so"

restart lampp

but still xdebug icon is missing screenshot

Please tell me what is wrong

like image 284
diEcho Avatar asked Dec 09 '14 17:12

diEcho


People also ask

Does xampp have xdebug?

Xdebug is a powerful open source debugger and profiler for PHP. It is included with XAMPP and can be used to display stack traces, analyze code coverage and profile your PHP code.

Where do I put xdebug in PHP INI?

For Windows, this is normally "c:\xampp\apache\bin\php. ini". Important note for Windows 7 & Vista users: As of August 2013 (XAMPP version 1.8. 2), the file "php_xdebug.


2 Answers

xdebug is located under xampp folder in

/opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so

on ubuntu 14.04 just search for it in /opt/lampp and copy the full path to it and then open php.ini and replace

;zend_extension=opcache.so

with

zend_extension="/path/xdebug.so"

in my case

zend_extension="/opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so"

like image 115
Mohammed Ramadan Avatar answered Sep 22 '22 18:09

Mohammed Ramadan


edited in /opt/lmapp/etc/php.ini assigned the location of xdebug.so to zend_extension

[xdebug]
zend_extension="/usr/lib/php5/20121212/xdebug.so"

Replace with

[xdebug]
zend_extension="xdebug.so"

and restart lampp and Xdebug is installed.

screenshot

AS I was not doing this before because Xdebug Docs itself warn not to do this

Note: You should ignore any prompts to add "extension=xdebug.so" to php.ini — this will cause problems.

like image 25
diEcho Avatar answered Sep 20 '22 18:09

diEcho