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'm trying to install xdebug on my ubuntu linux system.
Correct .so file, make install everything is correct, just maybe the php.ini configuration?
I use the installation wizard.
Installation Wizard Step by Step
I am at step 9, added the zend_extension on my INI file.
Added Zend Extension Command on other INI file.
when i PHP_INFO(), xdebug just does not appear in the list.
I googled around and seems other people php.ini file have this
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir=/tmp
but mine does not?
So i added those into my php7.4/cli/php.ini
still does not show on my phpinfo?
I go to the terminal and type php info xdebug seems there. xdebug support => enabled Version => 2.9.6
but i created a testpage.php and put phpinfo();
xdebug does not appear in the page?
Am i missing something?
Yes you need to update your php.ini file. Below is the code lines that i added in my php.ini file.
[XDebug]
zend_extension = "path of you extension example /usr/lib/php/xdebub.so"
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
Must restart your server after any changes in php.ini file.
Following the official documentation I wanted to run Xdebug in "jit" mode. But not working. When I add configuration to my php.ini file then everything works but every request (even when Xdebug listener in PhpStorm is off) takes long (5s to 0.5s when Xdebug is off in php.ini).
So I wanted to make it in "jit" mode or "on demand" but both are not working.
I'm using Windows 8.1 and XAMPP.
This is my config:
The minimum config that works for me in WAMPServer & Netbeans is
xdebug.remote_enable = on
xdebug.remote_handler = dbgp
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9000
I see you are configuring for the CLI, so check that the php.ini file you have changed is the one used by the CLI.
You can check that by doing this from the command line
>php --ini
then check the Loaded Configuration File to make sure you edited the right file
UPDATE
You also must uncomment, delete the leading ;, from the zend_extension line
zend_extension="c:/xampp/php/ext/php_xdebug-2.9.5-7.4-vc15-x86_64.dll"
I installed PhpStorm and Xdebug. When I'm trying to debug in a PhpStorm, not on a web page the debugger doesn't work.
I added the following code in php.ini
[Xdebug]
zend_extension = "C:\xampp\php\ext\php_xdebug-2.8.0-7.2-vc15.dll"
xdebug.remote_enable = 1
I also downloaded "php_xdebug-2.8.0-7.2-vc15.dll" and put it in C:\xampp\php\ext folder.
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