开发者

How to debug PHP with netbeans and Xdebug in Windows?

I have installed PHP using wamp server in Windows and I have give the entry for Xdebug in php.ini And Debugging not workin开发者_Go百科g in netbeans. How to solve this?

Thanks


If you are using wamp server in windows, make sure you edit the correct php.ini file (open php.ini FROM WAMP TRAY MENU) or check the path to your used php.ini file in phpinfo().

The path to your dll file looks like it might be wrong. Under WAMP it would normally point to something like

zend_extension_ts="C:\wamp\bin\php\php5.2.11\ext\php_xdebug-2.0.5-5.2.dll"


Is Xdebug showing up in when you call phpinfo?

<?php

echo phpinfo();

If not, then you don't have it correctly installed, and I would check both the php error log and apache.

Also, do you have the correct configuration in your php.ini for xdebug - such as the ports, id/key, etc?


I answered this here but I thought this was worth re-posting since so many Windows users are having problems after getting all the configuration right.

In my case it was a process running on my machine (Windows 7) that was using port 9000 already called aeagent.exe

I changed my php.ini setting to "xdebug.remote_port=9001", made the corresponding change in netbeans, then restarted Apache. Now it works.

Thanks to SysInternals TCPView tool.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜