Instantly share code, notes, and snippets.

Embed
What would you like to do?
Installing Xdebug for XAMPP

Installing Xdebug for XAMPP with PHP 7.x

Requirements

Setup

[XDebug]
zend_extension = "c:\xampp\php\ext\php_xdebug-2.6.0-7.2-vc15.dll"
xdebug.remote_autostart = 1
xdebug.profiler_append = 0
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "c:\xampp\tmp"
;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_log = "c:\xampp\tmp\xdebug.txt"
xdebug.remote_port = 9000
xdebug.trace_output_dir = "c:\xampp\tmp"
;36000 = 10h
xdebug.remote_cookie_expire_time = 36000
  • Stop/Start Apache

  • Click the Github ★ Star button :-)

PhpStorm

Netbeans

Eclipse

  • No comment

Visual Studio Code

Adobe Brackets

Sublime Text 2 and 3

@toubson

This comment has been minimized.

toubson commented Nov 11, 2016

Thanks. Very useful

@pdjkeelan

This comment has been minimized.

pdjkeelan commented Nov 20, 2016

Thank you, helped immensely 👍

@gvgvgvijayan

This comment has been minimized.

gvgvgvijayan commented Dec 2, 2016

Thank you!

@htxuankhoa

This comment has been minimized.

htxuankhoa commented Jan 6, 2017

Thank you! This helped me :)

@ghost

This comment has been minimized.

ghost commented Jan 13, 2017

Thanks!

@Ravita123

This comment has been minimized.

Ravita123 commented Jan 13, 2017

thanks..its very helpful

@BruceGitHub

This comment has been minimized.

BruceGitHub commented Jan 25, 2017

not work!
no error but not stopping on breakpoint ...

@OssamaSelim

This comment has been minimized.

OssamaSelim commented Jan 25, 2017

not work!!
same problem of Bruce

@gecesi

This comment has been minimized.

gecesi commented Jan 25, 2017

Thanks.
very helpful.

@westy92

This comment has been minimized.

westy92 commented Jan 30, 2017

I needed to add the line xdebug.remote_autostart = 1.

@TwitchBronBron

This comment has been minimized.

TwitchBronBron commented Feb 1, 2017

Thanks! I wish I had a way of upvoting this! You should make a stackoverflow answer, and then I can upvote that!

@nataliaIv

This comment has been minimized.

nataliaIv commented Feb 5, 2017

Thanks a lot!!!!!!!!!! Two days i can't install Xdebug!!! And I succeeded with your help!!!

@rypsx

This comment has been minimized.

rypsx commented Feb 6, 2017

Very good, thanks a lot !

@Iszeak

This comment has been minimized.

Iszeak commented Feb 12, 2017

Super, Thanks

@jpekeene

This comment has been minimized.

jpekeene commented Feb 14, 2017

Nice one, cheers

@MattBidas

This comment has been minimized.

MattBidas commented Feb 16, 2017

Thanks !!! Awesome !!!

@rioda78

This comment has been minimized.

rioda78 commented Feb 21, 2017

thanks very much

@grigore-94

This comment has been minimized.

grigore-94 commented Feb 21, 2017

Thanks!

@TekkCraft

This comment has been minimized.

TekkCraft commented Feb 22, 2017

Thanks! :D

@D4rkMindz

This comment has been minimized.

D4rkMindz commented Feb 22, 2017

Thank you :)

@dakn2005

This comment has been minimized.

dakn2005 commented Feb 25, 2017

Thanks

@booncu

This comment has been minimized.

booncu commented Mar 24, 2017

Thank you :D

@guzzyman

This comment has been minimized.

guzzyman commented Mar 29, 2017

Hey Man, all I can say is. . .You ROCK! Thanks for this piece. I have never worked with a PHP IDE other than Dreamweaver. I needed an IDE and a tool I can use for debugging php code. I searched and found your tutorial. I opted for eclipse and I got the XDebug installed and configured according to your tutorial. Everything just went well without any errors. Once again, thanks a bunch!

@magcent

This comment has been minimized.

magcent commented Apr 8, 2017

Thanks bro. ur the best!!

@mootensai

This comment has been minimized.

mootensai commented Apr 20, 2017

Thanks! Star 4 u!

@Giulia007

This comment has been minimized.

Giulia007 commented Apr 27, 2017

Wow! It works! Thank you so much.

@gk2go

This comment has been minimized.

gk2go commented Apr 30, 2017

Once I I launch php in the console, I get:
Failed loading c:\xampp\php\ext\php_xdebug-2.5.3-7.1-vc14-x86_64.dll

@poncianodiego

This comment has been minimized.

poncianodiego commented May 2, 2017

@gk2go this is because you have downloaded the incorrect binary, first use the https://xdebug.org/wizard.php to figure out which binary you need to download. Then make sure to include your binary within the specified folder and make sure it matches the name.

@boomsya

This comment has been minimized.

boomsya commented May 12, 2017

awesome! 👍 too easy like: press X to win

@CrawleyO

This comment has been minimized.

CrawleyO commented May 15, 2017

AWesome

@SoboLAN

This comment has been minimized.

SoboLAN commented May 16, 2017

Worked very nice for me.

However I can't seem to understand why it's not included by default in XAMPP, just like for older versions.

@Go-Noji

This comment has been minimized.

Go-Noji commented Jun 2, 2017

Thanks!

@packo6300

This comment has been minimized.

packo6300 commented Jun 16, 2017

i need Xdebug for xampp V3.2.2 :/ text for php.ini

@cpekas

This comment has been minimized.

cpekas commented Jun 17, 2017

thank you very much

@Micemade

This comment has been minimized.

Micemade commented Jun 23, 2017

Big thanks (also thnx @poncianodiego for little additional help :) )

@bytecodeman

This comment has been minimized.

bytecodeman commented Jul 2, 2017

Thank you!

@shovradas

This comment has been minimized.

shovradas commented Jul 10, 2017

Thanks! It was handy!!!

@mindtreeprakash

This comment has been minimized.

mindtreeprakash commented Jul 14, 2017

Thank you!

@PauloHenrique81

This comment has been minimized.

PauloHenrique81 commented Jul 17, 2017

Muitoo bom me ajudou muitooo!!!!!

@dydaniely

This comment has been minimized.

dydaniely commented Jul 21, 2017

i trusted https://xdebug.org/wizard.php and spend the all day , it is because it gave me wrong versionof dll .
Anyways you save my day , Good Job , Thanks

@WebDevBooster

This comment has been minimized.

WebDevBooster commented Jul 25, 2017

Very useful indeed!

@sanghisa

This comment has been minimized.

sanghisa commented Jul 26, 2017

Thank you ...

@kassius85

This comment has been minimized.

kassius85 commented Jul 30, 2017

Thank you very much!!!

@ouriels

This comment has been minimized.

ouriels commented Aug 11, 2017

Hello all, do you know what is wrong in my configuration please ?
I followed this procedure, I have no errors but Netbeans don't stop at my breakpoints.

When I launch Debug in Netbeans, It wait connection:

capture

In log file (C:\xampp\tmp\xdebug.txt), I have this many times:

Log opened at 2017-08-11 08:39:31
I: Connecting to configured address/port: 127.0.0.1:9000.
E: Time-out connecting to client. :-(
Log closed at 2017-08-11 08:39:31

Here is my Netbeans config:

capture2

And part of my php.ini:

[XDebug]
zend_extension = "c:\xampp\php\ext\php_xdebug-2.5.5-7.1-vc14.dll"
xdebug.remote_autostart = 1
xdebug.profiler_append = 0
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "c:\xampp\tmp"
;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_log="c:\xampp\tmp\xdebug.txt"
xdebug.remote_port = 9000
xdebug.trace_output_dir = "c:\xampp\tmp"
; 3600 (1 hour), 36000 = 10h
xdebug.remote_cookie_expire_time = 36000

I precise I use Symfony 3.3 application.

Thank you for your help !!

@hoangninh

This comment has been minimized.

hoangninh commented Aug 21, 2017

Amazing!! Thank you so much

@potapo

This comment has been minimized.

potapo commented Aug 29, 2017

cool,that's awesome

@ArnoldsK

This comment has been minimized.

ArnoldsK commented Aug 31, 2017

My lazy self says thanks!

@mariana-madrigal

This comment has been minimized.

mariana-madrigal commented Sep 4, 2017

Thanks a lot!!!

@zeyizhou

This comment has been minimized.

zeyizhou commented Sep 18, 2017

thanks

@elemes1

This comment has been minimized.

elemes1 commented Sep 24, 2017

Thanks a lot, for Laragon this didn't work at first, so I pointed the path to C:\laragon\bin\apache\httpd-2.4.27-win64-VC14\bin\php_xdebug-2.5.5-7.1-vc14-x86_64.dll Worked like Charm with your config.

Thanks

@n3omaster

This comment has been minimized.

n3omaster commented Sep 28, 2017

Thanks! Works excelent!

@GustavoJobstraibizer

This comment has been minimized.

GustavoJobstraibizer commented Sep 28, 2017

Thanks !

@odan

This comment has been minimized.

Owner

odan commented Sep 30, 2017

@a1iraxa

This comment has been minimized.

a1iraxa commented Oct 17, 2017

Great Work

@aliumarcdp

This comment has been minimized.

aliumarcdp commented Oct 25, 2017

Hi friends, I have latest PHP Version 7.1.9 and I have installed Apache server all are running fine. I am not able to configure Xdebug in eclipse environment. I am not getting Xdebug in php.ini after pasting php_xdebug-2.5.5-7.1-vc14.dll in D:\xampp\php\ext. Please guide me. I have environment Windows7, JDK, Eclipse, XAMP, Apache server all are running fine. What should I achieve it to configure Xdebug. Waiting for your response.

@khoimk

This comment has been minimized.

khoimk commented Oct 28, 2017

Thanks so much. This has ended my 2 painful days 👍

@odan

This comment has been minimized.

Owner

odan commented Oct 30, 2017

@aliumarcdp In case you have installed XAMPP on drive D: just change the drive letter from c: to d: in the php.ini [XDebug] section.

@bkarpov

This comment has been minimized.

bkarpov commented Nov 22, 2017

Thanks

@Abu3safeer

This comment has been minimized.

Abu3safeer commented Dec 3, 2017

Thank you very much.

@hossam131978

This comment has been minimized.

hossam131978 commented Dec 3, 2017

thank you very much *************************

@enfrte

This comment has been minimized.

enfrte commented Dec 4, 2017

Thanks, this worked on VS Code 1.18.1 - PHP 7.1. - XAMP 3.2.2

@yumarsoto19831

This comment has been minimized.

yumarsoto19831 commented Dec 16, 2017

Well done!!
Thank you very much. ;)

@Abu3safeer

This comment has been minimized.

Abu3safeer commented Dec 25, 2017

Waiting for PHP 7.2 version.

@DannyFeliz

This comment has been minimized.

DannyFeliz commented Jan 5, 2018

Worked like a charm 👍

@yashichiZX

This comment has been minimized.

yashichiZX commented Jan 7, 2018

Thank you very much!!!

@saebifar

This comment has been minimized.

saebifar commented Jan 8, 2018

very usefull

awesome :)

@Angelita31

This comment has been minimized.

Angelita31 commented Feb 2, 2018

Hello all,
I am In my php.ini page and there isn't [XDebug] section, miy question is: Where I shoud paste it?
[XDebug]
zend_extension = "c:\xampp\php\ext\php_xdebug-2.5.5-7.1-vc14.dll"
xdebug.remote_autostart = 1
xdebug.profiler_append = 0
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "c:\xampp\tmp"
;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_log = "c:\xampp\tmp\xdebug.txt"
xdebug.remote_port = 9000
xdebug.trace_output_dir = "c:\xampp\tmp"
;36000 = 10h
xdebug.remote_cookie_expire_time = 36000

Please I really appreciate your support!
Thanks in advance

@danielMensah

This comment has been minimized.

danielMensah commented Feb 10, 2018

me too I don't have any [XDebug] section. However I added it manually and still doesn't work.

@mak213k

This comment has been minimized.

mak213k commented Feb 13, 2018

I've the same problem too. Would be in this part that i put my xdebug path?

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;

; If you wish to have an extension loaded automatically, use the following
; syntax:
;
; extension=modulename.extension
;
; For example, on Windows:
;
; extension=msql.dll
;
; ... or under UNIX:
;
; extension=msql.so
;
; ... or with a path:
;
; extension=/path/to/extension/msql.so
;
; If you only provide the name of the extension, PHP will look for it in its
; default extension directory.
;
; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5+)
; extension folders as well as the separate PECL DLL download (PHP 5+).
; Be sure to appropriately set the extension_dir directive.
;
extension=php_bz2.dll
extension=php_curl.dll
extension=php_fileinfo.dll
;extension=php_ftp.dll
extension=php_gd2.dll
extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
extension=php_mbstring.dll
extension=php_exif.dll ; Must be after mbstring as it depends on it
extension=php_mysqli.dll
;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
;extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll

@mak213k

This comment has been minimized.

mak213k commented Feb 13, 2018

I found the answer:

Put this line:
zend_extension=php_xdebug-2.6.0-7.1-vc14.dll

But the version of the xdebug should have the same of php installed in your machine. Look the version in this path:

/dashboard/phpinfo.php

phpinfo

Download the xdebug in this site:

https://xdebug.org/download.php

@nuwandharshana

This comment has been minimized.

nuwandharshana commented Feb 16, 2018

Yes, You need to add the code under dynamic extension category
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;

@jandro935

This comment has been minimized.

jandro935 commented Feb 23, 2018

Thanks a lot !!

@viniciustaveira

This comment has been minimized.

viniciustaveira commented Feb 25, 2018

Sublime Text 2 and 3

@bhave-abhay

This comment has been minimized.

bhave-abhay commented Apr 24, 2018

I did not have the section [XDebug] either.
I added it, stopped and started Apache, and everything was good.

I haven't tried it, but I guess, if you restart Apache AFTER putting those dlls in ext dir and before changing the ini, it creates (an empty) section [XDebug]? Not sure.

But this was straight forward, and worked in first hit. Thanks a lot (y)

@zzsbebop

This comment has been minimized.

zzsbebop commented May 6, 2018

Thanks, You made my day!

@clintonqwert

This comment has been minimized.

clintonqwert commented May 8, 2018

Thank you!!

@MarkusL27

This comment has been minimized.

MarkusL27 commented May 9, 2018

Thanks, very helpfull!

@JulioCVaz

This comment has been minimized.

JulioCVaz commented Jun 17, 2018

very nice ! Thanks bro

@MartinMuzatko

This comment has been minimized.

MartinMuzatko commented Jun 24, 2018

works perfectly - thanks~!

@atdesigntas

This comment has been minimized.

atdesigntas commented Jun 29, 2018

Many thanks.

@NTsvetkov

This comment has been minimized.

NTsvetkov commented Jul 2, 2018

Thanks you! It's very helpful and easy.

Here are my 2 cents.

On some windows systems downloaded DLL has to be unblocked.

Don't forget to unblock it before or after copy to the ext folder!

image

@FellipePeixoto

This comment has been minimized.

FellipePeixoto commented Jul 20, 2018

very thanks!

@saxsax1995

This comment has been minimized.

saxsax1995 commented Aug 1, 2018

If you guys get err cant stop apache, only need to restart the computer, and everything is going to work.
Thanks for the post by the way :D

@saschaende

This comment has been minimized.

saschaende commented Aug 9, 2018

Thank you!!!!

@dacgray

This comment has been minimized.

dacgray commented Aug 10, 2018

Thanks!

@alex-belyaev

This comment has been minimized.

alex-belyaev commented Aug 15, 2018

was needed to rename php_xdebug-2.5.5-7.1-vc14.dll to php_xdebug.dll , didn't work without it

@3ansh

This comment has been minimized.

3ansh commented Oct 2, 2018

Just LOVE.

@guneyozsan

This comment has been minimized.

guneyozsan commented Oct 14, 2018

Thanks for the last step. It didn't work until I clicked the Github ★ Star button: 👍

@gladius882

This comment has been minimized.

gladius882 commented Oct 24, 2018

Thanks a lot! Working with PHP 5.6 too

@fmbetancourt

This comment has been minimized.

fmbetancourt commented Oct 27, 2018

was needed to rename 'php_xdebug-2.5.5-7.1-vc14.dll' to 'php_xdebug.dll' , didn't work without it

Excellent!

@dunght163

This comment has been minimized.

dunght163 commented Nov 16, 2018

Thank and thank again! Very helpful and save my time when setting up xdebug for windows with xampp 👍

@Coder-Dan

This comment has been minimized.

Coder-Dan commented Dec 3, 2018

It would be better to link to xdebug downloads since you need to also ensure that xdebug DLL you download is compatible with the Thread Safe version of PHP or the Non-TS version of PHP.

Linked is here: https://xdebug.org/download.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment