使用 PHP 和 XDebug 设置远程调试,配置
我已经阅读了几篇相关文章,并且已经习惯使用 Eclipse PDT 和 XDebug 来调试 PHP(服务器在本地运行)。
对于远程服务器和代码库,我可以更改 php 设置来配置 XDebug,我想进行远程调试。
我担心 xdebug.remote_host 和 _port 的设置
特别是因为我位于 Comcast 路由器后面(其公共 IP 与我的 Eclipse 计算机不同)。这是否意味着我需要端口转发才能让 Eclipse PDT 作为我的 XDebug 客户端工作?
我还没有决定是否要花时间走这条路,或者使用 FireFox 附加组件“easy Xdebug”是否明智。也许它会给我所需的所有功能。
I've read a few articles on this, and have become comfortable with using Eclipse PDT and XDebug to debug PHP, with the server running locally.
For a remote server and codebase, where I can make the php setting changes to configure XDebug, I'd like to debug remotely.
I'm concerned about the settings of xdebug.remote_host and _port
particularly since I'm behind a Comcast router (with a public IP different than my Eclipse computer). Does this imply I'd need port forwarding to get Eclipse PDT to work as my XDebug client ?
I haven't decided if I want to invest time to go that route, or if it would be wise to use the FireFox add-on, 'easy Xdebug'. Perhaps it would give me all the functionality I need.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我仍在掌握这一点,但这就是您所需要的:
您需要在远程服务器上设置本地 IP 地址,以便它知道连接到哪里。您需要有一个 DMZ 或端口从路由器转发到您的调试系统。还要确保在远程和本地系统上打开端口 9000(?)的防火墙,
您正在运行的代码需要位于远程服务器上。
我仍然对如何使用远程文件在本地服务器上编辑它感到困惑。因为调试器不想连接到远程访问连接。
i am still getting the hang of this, but this is what you need:
you need to set up your local IP address on the remote server so it know where to connect. you need to have a DMZ or port forwarding to your debug system from your router. also make sure to open the firewall on your remote and local systems for port 9000 (?)
the code you are running needs to be on the remote server.
i am still confused as to how to edit it on the local server with the remote files. since the debugger doesn't want to connect to remote access connections.