Unable to debug using PhpStorm with EC2

好久不见. 提交于 2020-01-16 08:40:33

问题


I am trying to configure PhpStorm on my local machine and repository is on Amazon EC2. I used SSH tunnelling also but unable to debug using remote debugger.

Here are my configuration files I have placed same configuration in

/etc/php-5.6.d/xdebug.ini
/etc/php.ini

zend_extension=/usr/lib64/php/5.6/modules/xdebug.so
xdebug.remote_enable=1                 ; Enable xdebug
xdebug.remote_autostart=Off             ; Only start xdebug on demand, not on every request
xdebug.remote_host=127.0.0.1      ; This is unused if the next setting is 'On'
;xdebug.remote_connect_back=On           ; Use a special $_SERVER['...'] variable to get the remote address
xdebug.remote_port=9002                 ; Port on the IDE to connect back to. Usually it is 9000
xdebug.idekey="phpstorm"                ; The IDE key which should match the XDEBUG_SESSION cookie valu
xdebug.remote_connect_back=1
xdebug.remote_log="/tmp/xdebug_remote_log.log"
xdebug.extended_info=1e

I'm creating SSH tunnel using the command given below

ssh -R 9002:localhost:9002 root@18.2xx.2xx.1xx

After turning off remote_connect_back the new logs are here

Log opened at 2018-04-23 15:59:32
I: Connecting to configured address/port: 127.0.0.1:9002.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///var/www/immunedata-prod/immunedata/website-php/index.php" language="PHP" xdebug:language_version="5.6.32" protocol_version="1.0" appid="15683" idekey="PHPSTORM"><engine version="2.5.5"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2017 by Derick Rethans]]></copyright></init>

-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>

Log closed at 2018-04-23 15:59:32

How to resolve this issue, I'm not using port 9000 because there's another microservice running at that port.

来源:https://stackoverflow.com/questions/49968159/unable-to-debug-using-phpstorm-with-ec2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!