简体   繁体   English

使用 PHP 和 XDebug 设置远程调试,配置

[英]Setting up remote debugging with PHP and XDebug, Configuration

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.我已经阅读了一些关于此的文章,并且已经习惯使用 Eclipse PDT 和 XDebug 来调试 PHP,服务器在本地运行。
For a remote server and codebase, where I can make the php setting changes to configure XDebug, I'd like to debug remotely.对于远程服务器和代码库,我可以进行 php 设置更改以配置 XDebug,我想远程调试。

I'm concerned about the settings of xdebug.remote_host and _port我担心 xdebug.remote_host 和 _port 的设置
particularly since I'm behind a Comcast router (with a public IP different than my Eclipse computer).特别是因为我在 Comcast 路由器后面(公共 IP 与我的 Eclipse 计算机不同)。 Does this imply I'd need port forwarding to get Eclipse PDT to work as my XDebug client?这是否意味着我需要端口转发才能让 Eclipse PDT 作为我的 XDebug 客户端工作?

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'.我还没有决定是否要花时间在 go 这条路线上,或者使用 FireFox 附加组件“easy Xdebug”是否明智。 Perhaps it would give me all the functionality I need.也许它会给我我需要的所有功能。

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.您需要在远程服务器上设置本地 IP 地址,以便它知道连接的位置。 you need to have a DMZ or port forwarding to your debug system from your router.您需要将 DMZ 或端口从路由器转发到调试系统。 also make sure to open the firewall on your remote and local systems for port 9000 (?)还要确保在远程和本地系统上为端口 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.因为调试器不想连接到远程访问连接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM