user1493194
user1493194

Reputation: 343

PHP Storm Debugging Creates Empty Server Definitions

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.

Upvotes: 12

Views: 5138

Answers (2)

junfei wang
junfei wang

Reputation: 121

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

Upvotes: 2

LazyOne
LazyOne

Reputation: 165471

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.

Upvotes: 13

Related Questions