Xdebug and PhpStorm remote does not work

不想你离开。 提交于 2020-01-07 06:34:11

问题


Is there a possibility to check if the web server is sending something to Chrome?

I have setting up PhpStorm and the web server in the same way, I have read in 1000 tutorials, but my PhpStorm doesn't receive anything from chrome.

Here are some settings:

php.ini

zend_extension="/usr/lib/php/20160303/xdebug.so"
xdebug.coverage_enable=on
xdebug.default_enable=on
xdebug.profiler_enable=on
xdebug.profiler_output_dir="/tmp"
xdebug.remote_autostart=on
xdebug.remote_port=9001
xdebug.remote_enable = on
xdebug.remote_connect_back = on
xdebug.idekey=PHPSTORM
xdebug.remote_handler=dbgp

I have disabled the firewall on the server. PhpStorm is listening on the port 9001.

Some ideas?


回答1:


The solution is very easy! The only thing I forgot was the ssh tunnel to my remote server from my local machine.

Here an example running config:

[xdebug]
zend_extension="/usr/lib/php/20160303/xdebug.so"
xdebug.remote_autostart=on
xdebug.remote_host=localhost
xdebug.remote_port=9001
xdebug.remote_enable = on
xdebug.idekey=PHPSTORM

Use as chrome plugin the XDebug Helper https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc

And as last step create an ssh tunnel to the remote server:

ssh -R 9001:localhost:9001 user@dev.server.com -N


来源:https://stackoverflow.com/questions/44368742/xdebug-and-phpstorm-remote-does-not-work

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