如何在 Windows 中使用 netbeans 和 Xdebug 调试 PHP?
我已经在 Windows 中使用 wamp 服务器安装了 PHP,并且在 php.ini 中给出了 Xdebug 的条目,并且调试在 netbeans 中不起作用。怎么解决这个问题呢?
谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您在 Windows 中使用 wamp 服务器,请确保编辑正确的 php.ini 文件(从 WAMP 托盘菜单中打开 php.ini)或在 phpinfo() 中检查所使用的 php.ini 文件的路径。
您的 dll 文件的路径看起来可能是错误的。在 WAMP 下,它通常会指向类似的内容
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
当你调用 phpinfo 时 Xdebug 是否出现?
如果没有,那么你没有正确安装它,我会检查 php 错误日志和 apache。
另外,您的 php.ini 中是否有针对 xdebug 的正确配置 - 例如端口、id/key 等?
Is Xdebug showing up in when you call 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?
我回答了这个这里但我认为这个值得重新发布,因为许多 Windows 用户在正确配置后遇到了问题。
就我而言,它是在我的计算机(Windows 7)上运行的进程,该进程使用端口 9000,已称为 aeagent.exe
我将 php.ini 设置更改为“xdebug.remote_port=9001”,在 netbeans 中进行了相应的更改,然后重新启动阿帕奇。现在可以了。
感谢 SysInternals TCPView 工具。
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.