I'm trying to configure XAMPP to debug. I've got the Xdebug dll from the site with my PHP version and put it in my ext fold, but when I change the php.ini with the next code and restart Apache, the localhost link stops working.
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug-3.1.0-8.0-vs16-x86_64.dll"
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
Someone who can help me here and ho to configure VSCode.
I need Xdebug version 2, not 3.
I used this link to install Xdebug: https://2.xdebug.org/docs/install
After doing all cases I can see Xdebug via php -v command :
But in phpinfo() output Xdebug is absent:
Can you please suggest me how to resolve this issue?
php.ini settings:
zend_extension="/usr/lib/php/20180731/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.client_host=127.0.0.1
xdebug.client_port="9000"
It's present in /usr/lib:
Useful informations:
Ubuntu 19.04 x86_64
PHP 7.2
Xampp for linux 7.3.4
Netbeans 8.2
Xdebug 2.7.1
I installed with success PHP-cli, netbeans and xampp for linux on my brand new Ubuntu 19.04 installation.
After that I uploaded my /opt/lampp/etc/php.ini file on https://xdebug.org/wizard.php and I followed scrupulously the instructions.
I copied the generated xdebug.so in /opt/lampp/lib/php/extensions/no-debug-non-zts-20180731 and then I edited the /opt/lampp/etc/php.ini adding those lines:
[xdebug]
zend_extension = /opt/lampp/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.remote_host = 127.0.0.1
xdebug.remote_log = /tmp/xdebug_remote.log
xdebug.remote_mode = req
xdebug.remote_port = 9000
I went to http://localhost/dashboard/phpinfo.php , here I can see the Zend Engine logo but in the "configuration" section there isn't any xdebug section.
In my local terminal i executed those commands php -m and php -v. The first returned a list of modules among which xdebug was not included, the second returned a the php version and, again, xdebug was not included.
After this I decided to add the [xdebug] section also in the /etc/php/7.2/cli/php.ini and then the php -m and php -v commands have returned xdebug in loaded modules and in the version list.
Anyway the http://localhost/dashboard/phpinfo.php refuses to list xdebug among the active modules and if I try to start a debug session netbeans hangs-on "waiting for connection xdebug".
I checked two, three, four.... times the zend_extension path and is corrected
I restarted multiple times lampp, apache, netbeans and the pc
I tried multiple ports 9000, 9001, 9002 ....
The php and xdebug versions are compatible
Here are some similar problems: xdebug in phpinfo() is not showing , No xdebug in phpinfo() , Xdebug installed but does not display in Phpinfo for Xampp .
Obviously, when I could, I tried these solutions, but without success.
Hello I have installed xampp, changed the php.ini to this:
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug-2.2.3-5.3-vc9.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 0
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.trace_output_dir = "C:\xampp\tmp"
So I created a php file:
<?php
phpinfo();
?>
Copy pasted the content and pasted in the xdebug wizard and got this output:
Tailored Installation Instructions
Summary
Xdebug installed: no
Server API: Apache 2.4 Handler Apache Lounge
Windows: yes - Compiler: MS VC9 - Architecture: x86
Zend Server: no
PHP Version: 5.4.7
Zend API nr: 220100525
PHP API nr: 20100525
Debug Build: no
Thread Safe Build: yes
Configuration File Path: C:\Windows
Configuration File: C:\xampp\php\php.ini
Extensions directory: C:\xampp\php\ext
Instructions
Download
Move the downloaded file to C:\xampp\php\ext
Edit C:\xampp\php\php.ini and add the line
zend_extension = C:\xampp\php\ext\
Restart the webserver
If you like Xdebug, and thinks it saves you time and money, please have a look at the donation page.
This tells me that it is not installed, so I followed the instructions and restarted the server. Opened the info php again, copied everything again and pasted it in the wizard again. Press the button and I get the exact same output, I don't know what I am doing wrong can anyone tell me what I do wrong?
Step 1: goto https://xdebug.org/wizard.php
step 2: copy and paste your phpinfo output to textarea which will be displayed on https://xdebug.org/wizard.php
step 3: click on analyze my phpinfo() output button, it will analyze your system and based on that it will give you suitable php_xdebug.dll file that you need to put at D:\xampp\php\ext folder
step 4: edit your php.ini file and add following line
zend_extension = D:\xampp\php\ext\your-php_xdebug.dll
step 5: Restart Server
Reference Video Tutorial : https://www.youtube.com/watch?v=HbJOP0YcSjs
complete video Tutorial for PHP Debug Example : Demo
Recent XAMPP version(mine is v3.2.2) already had the file php_xdebug.dll in xampp\php\ext folder , so we don't need go to https://xdebug.org/wizard.php for downloading the file.
Just open the file xampp\php\php.ini, add the codes:
[xdebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
Restart the XAMPP, then you could see the xdebug is working by type php --version in CMD:
Have you rectified the issue ?, if not please try this. I am having the same situations as yours, and I got result by
1)php.ini file content
zend_extension = "c:\xampp\php\ext\php_xdebug-2.2.3-5.4-vc9.dll"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
;xdebug.remote_host="localhost:81"
xdebug.remote_host=192.168.1.5
;xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"
please place the above mentioned dll at c:\xampp\php\ext\
xdebug.remote_host=192.168.1.5 - This is the IPv4 address of my system, I changed to this because I couldn't debug with localhost and 127.0.0.1.
in NetBeans IDE, open Tools-> Options->PHP->Debugging. The values of debugger port and Session Id should match with the port and idekey specified in php.ini
Now save php.ini, restart Apache and now try for debugging
Thanks Johnson
I had the same problem and it was solved checking the versions of php and xampp: it turned out, xampp was 32 bits (installed in a 64 bits computer) and I chose the wrong version of xdebug (it has to be 32 bits).
As mentioned earlier, make sure your xampp installation doesn't already have php_xdebug file in the php/ext folder before downloading xdebug dll. If the xampp/php/ext folder already has a php_xdebug file, just add 1 line in the php.ini file
[xdebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
In general this extension come with the XAMPP package (look into your \xampp\php\ext folder) but it's not added to your php.ini automatically.
add this line manually into your php.ini
extension=php_xdebug.dll
It's all ;) that worked for me
I installed php 5.4.0 and nginx 1.0.14 on windows 7.
When i want to install xdebug i downloaded xdebug 2.20(new for 5.4.0) and then i copied dll into my "php ext" folder.After that i added these lines in php.ini file.
zend_extension = C:\nginx\php\ext\php_xdebug.dll
[xdebug]
xdebug.remote_enable = 1
xdebug.remote_autostart=off
xdebug.remote_handler = dbgp
xdebug.remote_host = localhost
xdebug.remote_port = 9900
but when i started nginx it seems "Failed loading C:\nginx\php\ext\php_xdebug.dll" but the folder and file is correct.
But when i tried to change "zend_extension = C:\nginx\php\ext\php_xdebug.dll" with "zend_extension_ts = C:\nginx\php\ext\php_xdebug.dll" it didnt seem any error but my phpinfo() file doesnt seem xdebug installed.
How can i run it ?
You should no longer use zend_extension_ts, but just zend_extension. The _ts and _debug postfixes have been removed in PHP 5.3. If you see "failed loading" it's most likely that you use the wrong binary. Please refer to http://xdebug.org/find-binary.php to see which one you need.