I have installed xdebug from source in my system and add to my php.ini the following code at the end of the file:
/opt/lampp/etc/php.ini
[Xdebug]
zend_extension="/usr/lib/php/20151012/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
I created a php file to see the state of the server:
phpinfo.php
<?php phpinfo(); ?>
After restart apache I have no information about xdebug running. I don't know what seems to be the error or what are missing.
I did: /opt/lampp/bin $ phpenmod xdebug And it created me a xdebug.ini in /etc/php/7.0/mods-available with
zend_extension=/usr/lib/php/20151012/xdebug.so
Instead of compiling over source xdebug I downloaded the working builds from ActiveState (the makers of the Komodo IDE) provide their pre-compiled binaries of xdebug they use in their IDE.
Just go to their site:
http://aspn.activestate.com/ASPN/Downloads/Komodo/RemoteDebugging
The packages contain builds for all php versions.
I copied xdebug.so to /opt/lampp/lib/php/extensions and changed my php.ini with the entry zend_extension="zend_extension=/opt/lampp/lib/php/extensions/xdebug.so"
I changed also xdebug.ini with zend_extension=/opt/lampp/lib/php/extensions/xdebug.so
I restarted lampp and nothing seems to work for now.
When I run phpinfo.php with apache restarted I have no information about xdebug.
1 Answer 1
Configure Xdebug in Linux env(UBuntu) ::
Need to run phpinfo() to check xdebug is enable or not.
IF not enable , need to run sudo apt-get install php-xdebug Now, we have to restart our server to check xdebug is displaying after run
phpinfo() function.we can expect that xdebug is showing after run phpinfo().
Now, we have to make some configuration in php.ini file. try to add below piece of code at end of php.ini file
[XDebug]
xdebug.remote_enable=1
xdebug.remote_autostart = 1
xdebug.remote_port="9000"
xdebug.profiler_enable=1
xdebug.remote_host="localhost"
Again we have to restart server once
service apache2 restart //or /etc/init.d/apache2 restart
Hope, we are using VS code(visual studio code)
Just need to install php xdebug in this IDE. Reopen this IDE.
I think , everything will working fine. NP: From my side , I have configure this & works like a charm.
xdebug.sois in the right place/usr/lib/php/20151012/xdebug.so? And when you runphp -vin the command line, do you get the right version of php?php5enmod xdebug3) run php -v to check xdebug display xdebug.me PHP 7.0.30-0ubuntu0.16.04.1 (cli) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.0.30-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies with Xdebug v2.7.0alpha1, Copyright (c) 2002-2018, by Derick Rethansbut when I start apache my phpinfo.php have no information about xdebug. I can't understand why.