duanfu3634 2011-02-02 15:09
浏览 94
已采纳

调试远程PHP CLI脚本

Here is my situation:

I am developing PHP CLI scripts on a distant server using Eclipse IDE with the RSE plugin (allows to edit files directly on the server).

Now I need to debug these scripts in a similar fashion than in Java (break points, show the variables content, ...).

I found something that could do the job: XDebug and PDT (Eclipse plugin). The problem is that when I try to launch the debug mode Eclipse says that there is no PHP debugger on the local machine. I guess it should be installed on the server machine.

I would like to know if it's possible to use PDT and XDebug to debug remote scripts and, if it's the case, how to configure them to do so. If not, I'd like to know if other solutions exist. It seems like XDebug uses TCP so it should be possible to debug remotely. I can change my IDE if necessary.

The server runs Ubuntu 10.04 with php5-cli and the dev machine with eclipse runs Win7 32bit.

Thanks

  • 写回答

3条回答 默认 最新

  • doumi5223 2011-02-02 15:13
    关注

    Yes this is possible, you need to enable xdebug in the remote server's PHP.ini file and make sure that the xdebug port (default 9000) is not blocked by any firewalls.

    xdebug's page on setting up remote debugging.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 R运行没有名称为"species"的插槽对于此对象类"SDMmodelCV"
  • ¥20 基于决策树的数字信号处理,2ask 2psk 2fsk的代码,检查下报错的原因
  • ¥20 python作业求过程
  • ¥15 wincc已组态的变量过多
  • ¥60 如图:直线与椭圆X轴平行,求直线与椭圆任意一点的相切坐标计算公式
  • ¥50 如何用python使用opencv里的cv::cudacodec::VideoWriter函数对视频进行GPU硬编码
  • ¥100 c#solidworks 二次开发 工程图自动标边线法兰 等折弯尺寸怎么标
  • ¥15 halcon DrawRegion 提示错误
  • ¥15 FastAPI Uvicorn启动显示404
  • ¥15 centos7.9脚本,怎么排除特定的访问记录