问题描述
我的PHP Storm IDE中似乎有些问题.当我尝试使用侦听器进行调试时,Storm会加载来自Xdebug的传入连接"对话框,但是服务器名称文本字段为空.我可以指定要调试的文件,但是在IDE中什么也没有发生.我可以看到Storm正在调试堆栈跟踪中的文件,但是它没有映射到我的IDE中的文件.
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.
当我在Storm中检查服务器配置时,它已经创建了一个无名服务器定义.如果我完成此定义,请选择它,然后再次尝试调试,Storm会创建另一个空服务器定义.
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.
我已经在Storm上成功调试了很多年,所以我真的不确定导致这种现象的原因.任何帮助将不胜感激.
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.
谢谢.
推荐答案
所以..您的Web服务器软件是 nginx .
So .. your web server software is nginx.
此问题必须在nginx的配置文件中得到解决.事实是:nginx不提供$_SERVER["SERVER_NAME"]
的值(用PHP术语),PhpStorm使用它来确定在调试过程中要使用的配置
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.
检查此线程(最后几篇帖子),了解如何修复它: http://devnet. jetbrains.com/message/5494835#5494835
Check this thread (last few posts) about how to fix it: http://devnet.jetbrains.com/message/5494835#5494835
类似fastcgi_param SERVER_NAME $host;
这样的事情应该可以完成.
Something like fastcgi_param SERVER_NAME $host;
should do the job.
这篇关于PHP Storm调试创建空服务器定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!