Unable to configure Notepad++ DBGP plugin. Xdebug already installed

时间秒杀一切 提交于 2021-02-07 11:27:35

问题


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
    $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:

enter image description here

enter image description here


回答1:


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)




回答2:


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.




回答3:


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


来源:https://stackoverflow.com/questions/7791010/unable-to-configure-notepad-dbgp-plugin-xdebug-already-installed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!