I'm trying install xdebug on sublime3. I installed with package control and added the following code in php.info:
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_log="/var/log/xdebug/xdebug.log"
But it doesn't even list in the info.php. The documentation says to add
zend_extension="/wherever/you/put/it/xdebug.so"
But I can't find the location of .so in the Fedora that I'm using, and I guess it's because I downloaded it with package control. Can anyone help?
Run php -i | grep extension_dir in your terminal to see where the extensions for PHP are installed.
Related
I want to install Xdebug so because my PHP version is 7.4.8, I downloaded php_xdebug-3.0.2-7.4-vc15-nts-x86_64.dll file and placed it at php\ext\ folder.
Then I opened up php.ini and added these lines at the end of it:
[XDebug]
zend_extension="F:\xampp\php\ext\php_xdebug-3.0.2-7.4-vc15-nts-x86_64.dll"
xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.var_display_max_depth=15
After that I restarted Apache and opened up dashboard but the Xdebug is not showing there, meaning that it is not installed yet somehow.
So what should I do now, in order to install it properly?
Maybe try using an older version of XDebug that is verified to work in the XAMPP Dashboard:
https://xdebug.org/files/php_xdebug-2.9.7-7.4-vc15-x86_64.dll
If that does not work, then there might be more details on this page that could help:
https://gist.github.com/odan/1abe76d373a9cbb15bed
I have been through the forums without success. I'm trying to use xcode with PhpStorm on my pimp. I use MAMP/PHP 7.1.19.
When I do a phpinfo() I have nothing about Xdebug.
I have two php.ini files:
-/Applications/MAMP/conf/php7.3.0/php.ini
-/Applications/MAMP/bin/php/php7.3.1/conf/php.ini
I modified both files with:
-zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so"
I have of course check if the file xdebug.so exists.
If the file xdebug.so exists then you have to enable it in the php.ini. At the end of the file you have uncommented the zend_extensionbut you have to enable it. Add this:
[xdebug]
zend_extension="/Applications/MAMP/bin/php/php7.3.1/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so"
xdebug.profiler_output_dir = "/tmp/xdebug/"
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_log="/usr/local/var/log/httpd/xdebug.log"
xdebug.default_enable=0
xdebug.profiler_enable=0
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.var_display_max_depth=1000
For someone else who doesn't have the xdebug.so file, you have to install the Xdebug extension with PECL. Open the terminal and paste:
cd /Applications/MAMP/bin/php/php7.3.1/bin and then install xdebug ./pecl install xdebug
I used https://xdebug.org/wizard.php to check my Xdebug status that I installed using below instruction.
But it's seems not working. I tried with NetBeans Xdebug / Sublime Xdebug Clinets and also PHPStrome, but php files are not hit the debug point.
When I check the php content with I used https://xdebug.org/wizard.php it's also displayed
Xdebug installed : no
Bu I have successfully run all commands and copied the file into xammp's extentions folder.
php.ini conetnt:
;zend_extension=opcache.so
zend_extension="/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so"
[xdebug]
xdebug.remote_host=localhost
xdebug.remote_port=9001
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.idekey="netbeans-xdebug"
xdebug.remote_log="/Applications/XAMPP/logs/xdebug.log"
Tried list:
I have tried this one Xdebug on macOS 10.13 with PHP 7 but it's not work for me.
For #streos (I tried to install xdebug via brew but it's won't work for me):
Had problem with permissions, the system didn't let my install xdebug, so I ended up installing another php instead of using the built-in one:
Try this article
I'm having some problems getting xdebug running on ElementaryOS (Ubuntu 16.04.2) with php7, and Apache2.
I installed it with sudo apt-get install php-xdebug. The install didn't report any errors. I've added
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_connect_back=1 ; Not safe for production servers
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart=true
to /etc/php/7.0/apache2/php.ini.
I also need to add the xdebug.so file location like, zend_extension="/path/to/xdebug.so". However, I have been unable to find xdebug.so after the install.
Does anyone know where xdebug.so is, or has the instructions changed since php7.0 was released. Most of the instructions/help seem to be for php5 online.
Thanks.
Check xDebug is installed.
php -m
Run locate xdebug.so
Returns /usr/lib/php/20151012/xdebug.so for me, but 20151012 might change in the future.
You have to execute sudo updatedb if locate does not return anything or you've just installed locate
For the new versions just add xdebug file name, example:
zend_extension=xdebug.so
xdebug.default_enable = 1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
...
If it does not work use Linux find command like the following:
find / -name "xdebug.so"
What does this command do?
Find = just find
/ = in all of directories inside / (all)
-name "xdebug.so" = with name equal to xdebug.so
Create a file with phpinfo(). Find the item extension_dir. There you'll see where the xdebug.so resides. Mine is:
/usr/local/lib/php/extensions/no-debug-non-zts-20170718
In php.ini file
;xdebug Configuration
zend_extension="C:/TenthPlanet/wamp/bin/php/php5.3.0/ext/php_xdebug-2.1.2-5.3-vc6.dll"
zend_debugger.allow_hosts=localhost
zend_debugger.expose_remotely=always
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir="C:/TenthPlanet/wamp/tmp/xdebug"
xdebug.remote_enable=1
xdebug.remote_autostart=On
xdebug.remote_host=localhost
xdebug.remote_mode=req
xdebug.remote_log="C:/TenthPlanet/wamp/tmp/xdebug"
But its not installing. When i copied my phpinfo source in xdebug.org/wizrad.php its saying my compiler MSVC6 needs to be upgrade MSVC9 (microsoft visual studio C++). Then I installed the latest one but its not working.
Its not installing properly guys. So whats is the problem ?
My configuration is
PHP - 5.3.0
Apache - 2.2.11
Try using the php_xdebug-2.2.3-5.3-vc9.dll instead or the php_xdebug-2.1.2-5.3-vc6.dll
Alternatively run this wizard on the XDEBUG site, do as it says and copy and paste the output from your phpinfo into it and it will tell you which version you need automatically.