16

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

ZygD
  • 22,092
  • 39
  • 79
  • 102
Kandinski
  • 953
  • 11
  • 30
  • Did you set any breakpoints in Notepad++? If not then you should check the "Break at first line when debugging starts" checkbox. – aefxx Oct 17 '11 at 08:39
  • I tried as you said...I tried with breakpoints as well, but still won't move. I expect the dropdown "disconnected" should change or the notepad++ should flash on the taskbar. – Kandinski Oct 17 '11 at 09:18
  • @FarcasO. did you ever find a solution for this? I'm experiencing the same. – Mahn Aug 27 '12 at 00:50
  • 1
    Solved, changing the ports on both the xdebug settings and the dbgp settings did it for me. – Mahn Aug 27 '12 at 02:23
  • 2
    You should write the solution as an answer and accept it. – CSᵠ Jan 10 '13 at 07:15
  • If you are debugging with Notepad++ you might want to reconsider your approach. Maybe use an IDE like Netbeans instead? I found setting up xdebug relatively painless with the latest version ( 8+) . – Joelerr 15 mins ago – AndrewD Feb 10 '15 at 18:59

3 Answers3

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)

Ren
  • 1,111
  • 5
  • 15
  • 24
0

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.

Ostico
  • 53
  • 5
0

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