Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't get Xdebug to work on Windows 7

I installed the latest XAMPP package which includes PHP 5.3.0. I am trying to enable Xdebug, but it just won't work.

Here's what I changed in the php.ini shipped with XAMPP:

; uncommented
zend_extension = "X:\xampp\php\ext\php_xdebug.dll"

; added the following lines:
xdebug.remote_enable=true
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp

Apache starts fine, but when I open http://localhost/ in my browser, I get the following error:

alt text

If I click the Close the program button, the error message will reappear in a second as if it was in an infinite loop. I'd greatly appreciate any help in getting this to work.

I am running a fresh install of Windows 7 Ultimate 64-bit.

EDIT: From the result of phpinfo():

Zend Extension Build    API220090626,TS,VC6 
PHP Extension Build     API20090626,TS,VC6 
Debug Build             no 
Thread Safety           enabled
like image 469
Derek Avatar asked Dec 14 '09 23:12

Derek


2 Answers

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

like image 164
zombat Avatar answered Sep 18 '22 02:09

zombat


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

like image 34
Basav Avatar answered Sep 20 '22 02:09

Basav