Xdebug is stuck at: "Waiting for incoming connection with ide key xxx"

Answered

Env: Windows 8.1 64bit, PHP 5.6.21, Xdebug 2.4.0, everything is local, no domains setup.

PHP Storm's "Web Server Debug Validation" runs successfuly. PHP script debugging works fine, since it's inline in-IDE-debugging. But PHP Web Application debugging is not working. Breakpoint is set at the very first lines of the main file (index.php)

It always gets stuck at "Waiting for incoming connection with ide key XXXX" which implies a random set of numbers which is actually not my ide key; but it's also the same set of numbers it starts the browser with; /index.php?XDEBUG_SESSION_START=XXXX

Xdebug configration:

[xdebug]
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = E:/Server/tmp/php_profiles
xdebug.remote_enable = 1
xdebug.remote_connect_back = 1
xdebug.idekey = ElmaPhpStorm
xdebug.remote_port = 9009
xdebug.default_enable = 1
xdebug.remote_host = localhost

 

PHP Storm is set to;

1. Accept external connections in debug settings.

2. Mapping disabled since web-server, php, phpstorm and served files are on the same machine without symlinks.

3. Listen for debug connections enabled (Phone icon)

4. IDE Key the same with in php.ini

 

As per netstat -a | find "9009" command, no one is listening on port 9009. (It was defaulted to 9000 but nevertheless I tried to change the port so that maybe it could work, but no luck.)

In xdebug configuration "localhost", "127.0.0.1" and real local IP of the machines are tried. (Of course with restarting the web-server each time.)

Bookmarklets don't work either. Tried with PHPStorm Chrome extension, still no luck.

 

What else could be done?

4 comments
Comment actions Permalink

Hi there,

1) xdebug.remote_log -- collect xdebug logs and see what it has to say about it

2) Will it work if you place xdebug_break(); in the code?

3) output of php_info() please -- top header + actual xdebug section.

P.S.

xdebug.remote_connect_back = 1 -- this does not makes much sense for fully local debug (the same computer). having this option enabled tells xdebug to ignore whatever you are setting in xdebug.remote_host

0
Comment actions Permalink

Funny enough, after adding the log line, it started to work:

xdebug.remote_log = E:/Server/tmp/xdebug.log

It makes no sense, but after adding this line, now it's working..

1
Comment actions Permalink

Hello. I need some help!

I read everything you have put in here, about the configuration of xdebug. I did everything too, but still is not working for me.

I will put step by step what I did and please....What are me doing wrong? Thank you!

 In php.ini the line where indicates the log address is not working, Do I have to create my own xdebug.log? or It is created automatically by the system?

After that, I run my HTML page, and "Start listening por PHP debug conections" I go to https://www.jetbrains.com/phpstorm/marklets/ click over "Generate" button, and over "Start debugger" link.

In PhpStorm, I put on green debug icon. I refresh my page, click the submit button and nothing happend.

I have changed the order of steps very times and nothing.

I have tried too a only script php like this:

This is de HTML 

This is the script php called by HTML

Please, somebody can help me?? 

Thank you very much!




0
Comment actions Permalink

Solved it!! Seemed firewalls settings!

Greetings!

0

Please sign in to leave a comment.