Can't get Xdebug to work on Windows 7 Can't get Xdebug to work on Windows 7 apache apache

Can't get Xdebug to work on Windows 7


It's possible you have the wrong version of Xdebug. I would take a look at phpinfo() and compare the information there to the different versions of the Xdebug dll.

Specifically, you want to see if "Thread Safety" is enabled, and you need to know whether you're running a VC6-compiled PHP or a VC9 (if you're using Apache, it's almost guaranteed that you want the VC6).


Have you tried custom installation wizard of XDEBUG, it analyses your php installation and provides exact steps you need to follow

The Windows binaries generally work for every mini release for the mentioned PHP version, although the extension is built against the most current PHP version at that time. The VCx marker tells with which compiler the extension was built, and Non-thread-safe whether ZTS was disabled. Those qualifiers need to match the PHP version you're using. If you don't know which one you need, please refer to the custom installation instructions.

http://xdebug.org/wizard.php

Just paste your phpinfo out put in the text box and you will get exact xdebug dll you would need for your php


frank-ly, I also had 2 REALLY bad days, and I don't now what finally fixed it, so here's my collection of Do's and pitfalls:

; this is the thread safe version,; the absence of _nts_ in the dll name 'shows' this; do not use _ts, your library won't get registered and won't show in phpInfo()zend_extension = "D:/wamp/bin/php/php5.3.8/zend_ext/php_xdebug-2.1.2-5.3-vc9-x86_64.dll"

check your php.ini, check phpinfo() if all values (arrive)

xdebug.remote_enable = onxdebug.remote_handler=dbgpxdebug.profiler_enable = offxdebug.profiler_enable_trigger = off; if you have multiple virtual hosts ( like 'local.fooclient' ); maybe using the IP is safer (for any same-machine-debugging)xdebug.remote_host=127.0.0.1; maybe a -much- lower port helped, 84 was free. use netstat to figure out.xdebug.remote_port=84; idekey! also see note belowxdebug.idekey=netbeans-xdebug

More Pitfalls:

I have seen a typo of xdebug.remote_handle (without r) several times on the web. beware.

A note on the idekey: The above idekey did show in phpinfo() as master value, BUTwas overridden with a 'local value' like MYMACHINENAME$. ==> Setting a global env var (in computer properties) named DBGP_IDEKEY and rebooting (or maybe just logging out) to (also) netbeans-xdebug helps! Again: re-check in phpInfo() it took effect.

Of course adjust netbeans-menu:options->php tab->debugging section to this port and session id.

Here is a script, to check (by php means) if that port you intend to talk to is open. (further below also in the comments, for those to lazy too type from the image)

For your browser to connect, don't start to forget (amidst frustration) to always attach the debug-starting get-argument:

  http://localhost/myTest.php?XDEBUG_SESSION_START=netbeans-xdebug

On the port frontier, also this tool might help.

Quadruplecheck you are keeping VC6 and VC9 compiled versions of everything apart.

Running your whatever/path/php.exe myTest.php from the command line (once the above settings are done) might also reveal additional errors (it did, while I was tinkering with an incorrect dll).

I can recommend http://www.wampserver.com(for personal reasons it fits me better than the popular xampp package...)