开发者

XDebug not working with xampp

开发者 https://www.devze.com 2023-01-04 07:14 出处:网络
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)

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开发者_C百科.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?


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


If you havent solved this issue. Just in case and for anyone looking for an answer. Go to localhost (if your using XAMPP that is) and click on the left menu's link phpinfo(). Then click anywhere on the table and press "Ctrl + C'. Then go to http://xdebug.org/find-binary.php and paste all the info that you just copied from the table in the white text-box. Click the link below and youll have the right fil to download plus some instructions. Copy that file that you just downloaded into the location stated in the instructions (ie. C:\xampp\php\ext - in my case im using XAMPP 1.7.7). Go to your php.ini file that should hopefully be in 'C:\xampp\php\php.ini' and look for the kay-word '[XDebug]'. No copy the line 'zend_extension = C:\xampp\php\ext\php_xdebug-2.1.3-5.3-vc9.dll' (in my case) under the ';zend_extension = "C:\xampp\php\ext\php_xdebug.dll"' line. Note: make sure you dont put the ';' at the beginning of the new line that you just pasted. Now go ahead and uncomment all the 'exdebug.FUNCTION_NAME' lines that are at the bottom of each block of text.

Restart you server. Go back to your phpinfo() page, copy the table as you did before and paste it in the xDebug website. This should be enough for you to get it working.

PD: make sure that the file that you download from xDebug is approximately 147kb as there has been some instances where people download small files (ei. 3kb).

Let me know how it goes. :)


Xdebug v2.0 shouldn't work with PHP 5.3. Xdebug v2.1 provides PHP 5.3 support. Otherwise I would get rid of the xdebug ini config except:

zend_extension_ts = "C:\xampp\php\extensions\php_xdebug.dll"
xdebug.remote_enable   = On
xdebug.remote_host     = "localhost"
xdebug.remote_port     = 9000
xdebug.remote_handler  = "dbgp"

use this as your test and once this works then add additional configs. Make sure you comment out other zend stuff.


The joomla web site has a great tutorial on getting XAMPP, XDebug, and Eclipse (Netbeans is configured in the same fashion) working together and they cover all major operating systems.

http://docs.joomla.org/Setting_up_your_workstation_for_Joomla!_development


I have faced such a type of problem where i configured as xdebug said for the xampp 1.7.2. Couldn't work. I just changed the zend_extension_ts to zend_extension. it works for me.

0

精彩评论

暂无评论...
验证码 换一张
取 消