Php – XDebug not working with xampp

apachePHPxamppxdebugzend-framework

I'm using (or trying to anyway) use the bundled XDebug with XAMPP 1.7.2. It comes bundled with Apache 2.2.12, PHP 5.3.0, XDebug 2.0.5 and Zend (not sure on version)

This is a totally fresh install of XAMPP, the only thing I've added to php.ini (at xampp/php/php.ini) is:

zend_extension_ts = "C:\xampp\php\extensions\php_xdebug.dll"
[xdebug]
xdebug.auto_trace = 1
xdebug.collect_includes = 1
xdebug.collect_params = 1
xdebug.collect_return = 1
xdebug.default_enable = 1
xdebug.extended_info = 1
xdebug.show_local_vars = 0
xdebug.show_mem_delta = 1
xdebug.trace_format = 1
xdebug.trace_options = 0
xdebug.trace_output_dir ="C:\xampp\tmp"

xdebug.remote_enable=1
xdebug.remote_mode="req"
xdebug.remote_host=127.0.0.1
xdebug.remote_port=17869
xdebug.idekey=<idekey>

xdebug.remote_handler="gdb"
xdebug.auto_profile = 1
xdebug.auto_profile_mode = 2
xdebug.output_dir = "C:\xampp\tmp"

xdebug.dump.SERVER = REMOTE_ADDR,REQUEST_METHOD

(this is only one of many different configs I've tried)

But try as I might, XDebug just will not connect to anything. I've tried Netbeans and Debugclient.exe (in xampp/php/debugclient.exe). They both just sit and wait forever.

How do I get XDebug to work?

Best Answer

My case was quite annoying. Everything was right except for one unexpected thing. The config line

zend_extension = \xampp\php\ext\php_xdebug-2.2.5-5.5-vc11.dll

generated by the XDebug website is wrong. I had to change to

zend_extension = php_xdebug-2.2.5-5.5-vc11.dll

Hope it may save some time if anyone has the same problem as me in the future

Related Topic