I've searched a lot for this problem when debugging php using PhpStorm with xdebug, I found 3 or 4 links discussing this problem, but none of them are useful.My Xdebug's version is 2.2.3, and PhpStorm'version is 6.03. I could debug every line step by step except this one
$this->link = mysql_connect($this->dbserver, $this->dbuser, $this->dbpass);
PhpStorm shows this error:Waiting for incoming connection with ide key "14841". Here are my xdebug configuration:
zend_extension="/usr/lib/xdebug.so"
xdebug.remote_autostart=1
xdebug.show_local_vars=1
xdebug.dump.GET=*
xdebug.dump.POST=*
xdebug.dump.SERVER=*
xdebug.auto_trace=On
; default trace output directory /tmp
xdebug.collect_vars = On
xdebug.trace_output_dir=/tmp
xdebug.collect_params=4
xdebug.collect_return=On
xdebug.profiler_enable=Off
; default trace output directory /tmp
;xdebug.profiler_output_dir=/tmp
;xdebug.profiler_enable_trigger=On
;test.php?XDEBUG_PROFILE
xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9001
xdebug.remote_handler="dbgp"
xdebug.remote_log = "/tmp"
xdebug.remote_connect_back=1
xdebug.idekey=PHPStorm
I add these lines " xdebug.remote_connect_back=1 xdebug.idekey=PHPStorm ", also resisted ide ,it is still the same i assure that the three parameters are correct.
You wrote:
PhpStorm shows this error:Waiting for incoming connection with ide key "14841".
But you use:
xdebug.idekey=PHPStorm
Those ide keys need to match. PHP Storm is a bit funny about it.
But then you also said:
I could debug every line step by step except this one
$this->link = mysql_connect($this->dbserver, $this->dbuser, $this->dbpass);
How are they different? Is there different behaviour, or just doesn't it stop?
For me, the debugger never connected and I saw the Waiting for incoming connection with ide key message because I set set my Server configuration to port 9000. This should be set to port 80 (or whatever other port the webserver is listening to! This was confusing to me because it's right next to the Debugger dropdown and I figured it was to set the Xdebug port.
The Debug port is configured in Settings->Languagues & Frameworks->PHP->Debug. Set this to 9000 or whatever you configured php.ini to be.
Just a note, I was using IntelliJ IDEA, but it's all the jetbrains platform.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With