How to debug PHP with netbeans and Xdebug in Windo

2019-06-10 23:14发布

问题:

I have installed PHP using wamp server in Windows and I have give the entry for Xdebug in php.ini And Debugging not working in netbeans. How to solve this?

Thanks

回答1:

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"


回答2:

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?



回答3:

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.