PHP Storm Debugging Creates Empty Server Definitions

跟風遠走 提交于 2019-12-06 04:03:01

问题


Something seems to have broken in my PHP Storm IDE. When I try and debug using the listener, Storm loads the "Incoming connection from Xdebug" dialog but, the server name text field is empty. I can specify the file to debug but, nothing happens in the IDE. I can see that Storm is debugging the file in the stack trace but, it isn't mapping to the file in my IDE.

When I check the server configuration in Storm, it has created a nameless server definition. If I complete this definition, select it, and try debugging again, Storm just creates another empty server definition.

I have been successfully debugging with Storm for many years so I'm really unsure what has happened to cause this behaviour. Any help would be appreciated.

Thanks.


回答1:


So .. your web server software is nginx.

This issue must be fixed in nginx config file. Thing is: nginx does not provide value for $_SERVER["SERVER_NAME"] (in PHP terms) which is used by PhpStorm to determine what config to use during debug.

Check this thread (last few posts) about how to fix it: http://devnet.jetbrains.com/message/5494835#5494835

Something like fastcgi_param SERVER_NAME $host; should do the job.




回答2:


i set a "server_name xxx.foo.com;" attribute in nginx configure file solve this problem



来源:https://stackoverflow.com/questions/23344106/php-storm-debugging-creates-empty-server-definitions

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