How to debug PHP with netbeans and Xdebug in Windo

2019-06-10 23:22发布

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

3条回答
啃猪蹄的小仙女
2楼-- · 2019-06-10 23:43

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楼-- · 2019-06-10 23:59

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.

查看更多
孤傲高冷的网名
4楼-- · 2019-06-11 00:09

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"
查看更多
登录 后发表回答