I have installed xdebug
on PHP
but now I can't make the notepad++
DBGp
plugin work.
I have latest wamp
version on Win7
and the wwww
folder is on partition: d:\www
.
I have coded a test file test.php
:
<?php
开发者_如何学Python $test = "3";
echo $test;
?>
And I have tried opening it in web browser using this link :
http://localhost/test.php?XDEBUG_SESSION_START=test
But the DBGp
won't connect. I tried with and without IDE_Key
.
I have gone through the documentation many times but was unable to find/solve the issue. Hopefully someone could know the reason.
Below are some screenshots:
To fix this issue, the ports on both the xdebug settings and the dbgp settings needed to be changed.
It is unclear from the above comments whether it was because they both attempted to use the same port, ports were used by other applications etc. but perhaps Kandinski can clarify this by editing this answer when they see it.
(Posting the given answer [see comments on question] to remove the question from the unanswered queue. User was asked over 3 years ago to do this but has not done so yet. Credit for this answer remains theirs)
You have to set xdebug to automatically accept new debug connections:
$ cat /etc/php5/apache2/conf.d/xdebug.ini
zend_extension=/usr/lib/php5/20121212/xdebug.so
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_host="127.0.0.1"
xdebug.remote_port=9000
xdebug.idekey="CLUJ3$"
Obviously if you are running PHP as FPM you have to change the default port to 9000 to some other ( Ex: 9001 )
Restart apache after.
Install Chrome XDebug Helper. In options, set IDE Key = Others and value = default. Works for me.
[Xdebug]
zend_extension="php_xdebug.dll"
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.autostart=on
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.idekey=default
精彩评论