简体   繁体   English

PhpStorm-使用xDebug进行远程调试

[英]PhpStorm - Remote debugging with xDebug

OK, first things first. 好,首先 I started working on a new PHP project which, as in many cases, to put it mildly, built terribly. 我开始着手开发一个新的PHP项目,在许多情况下,总的来说,它构建得非常好。 It is not possible, at this point, to copy the project to a local machine so I forced to work via FTP. 此时无法将项目复制到本地计算机,因此我不得不通过FTP进行工作。

I would like to set up remote debugging, so the code will run remotely but I will be able to debug it locally. 我想设置远程调试,因此代码可以远程运行,但可以在本地调试。

The server is Amazon Linux, Apache, PHP 5.3.29 with xDebug v2.2.3. 服务器是Amazon Linux,Apache,PHP 5.3.29和xDebug v2.2.3。

php.ini: php.ini中:

zend_extension=/usr/lib64/php/modules/xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000

I am trying to make in happen, according to many tutorials from the web, but it seems I am doing something wrong. 根据网络上的许多教程,我正在努力实现这一目标,但看来我做错了什么。

Somebody knows a working step-by-step configuration so I can set this up and forget? 有人知道可以进行逐步配置,因此我可以进行设置而忘记了吗?

If you want your IDE to connect to xDebug you need to set the remote host to the IP where your IDE runs. 如果要让IDE连接到xDebug,则需要将远程主机设置为运行IDE的IP。

Other option would be xdebug.remote_connect_back=1 其他选项是xdebug.remote_connect_back=1

see: https://xdebug.org/docs/all_settings 请参阅: https//xdebug.org/docs/all_settings

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

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