XAMPP can not install xdebug

23,238

Solution 1

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

Solution 2

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:

Xdebug

Solution 3

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).

Solution 4

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

Solution 5

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"
Share:
23,238
Niek Jonkman
Author by

Niek Jonkman

Updated on January 04, 2020

Comments

  • Niek Jonkman
    Niek Jonkman over 4 years

    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?

  • Chris P
    Chris P almost 8 years
    I use xampp (php 7.0) I found tailored installation usefull xdebug.org/wizard.php I had pasted zend_extension = C:\xampp\php\ext\php_xdebug-2.4.0-7.0-vc14.dll and after apache restart works!
  • arunjos007
    arunjos007 about 7 years
    here explains step by step procedure hubpages.com/technology/…
  • Hashim Aziz
    Hashim Aziz over 4 years
    This just repeats information already found in previous answers.
  • Paul T.
    Paul T. over 4 years
    Using the wizard helped me get the xdebug going for my installation.
  • Jehong Ahn
    Jehong Ahn over 4 years
    Xdebug MUST be loaded as a Zend extension.