3
votes

I can not seem to get the PHP Debugger Tool in Eclipse to launch a debugging session.

Settings I have used to configure debugging are below.

Additionally I have changed my ports for xdebug to 19000 and for zend debugger to 30000

php.ini

; XDEBUG Extension

zend_extension=c:/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.2.5-5.5-vc11-x86_64.dll

[xdebug]
xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=19000
xdebug.remote_handler="dbgp"

1) Clicked on Run -> Debug Configurations -> Server Tab Run Configurations Server Setting

2) Clicked on Run -> Debug Configurations -> Debugger Setting Run Configurations Debugger Setting

3) Clicked on Window -> Preferences -> Clicked on PHP Filter To Expand on Left of Window -> Installed Debuggers -> XDebug

Window Preferences PHP Filter XDebugger Setting

4) Clicked on Window -> Preferences -> Clicked on PHP Filter To Expand on Left of Window -> Installed Debuggers -> XDebug

Run Configurations XDebug DBGp Debugger Setting

5) Clicked on Run -> Debug Configurations -> Server Debugger Drop Down -> Zend Debugger Settings

Zend Debugger Settings

4
Did you change xdebug remote port in eclipse xdebug settings? Are you trying to debug local server? Make sure your web launch configuration have xdebug selected.zulus
@zulus, first of all, thank you for your assistance! I have updated my post with screenshots of the steps I took. In order to answer the second question, I will need to ask where can I go to find if i have local server debugging started? Thank you. Please let me know what other information I can provide. I have taken all necessary screenshots and can upload.Vahe Jabagchourian
It's simple, are you connecting into server by localhost or 127.0.0.1? If yes you are on local server. On windows make sure that eclipse isn't blocked by firewall. Did you read these tutorias? wiki.eclipse.org/Debugging_using_XDebug and eclipse.org/pdt/documents/XDebugGuideForPDT2.0.pdfzulus
Have you xdebug on phpinfo page? Maybe this dll isn't compatible with your php distribution. To make sure this is not a problem with localhost, you can temporary set xdebug configuration to accept all debug sessions (xdebug.remote_connect_back=On).zulus
So xdebug isn't installed. Can you use this page to determine valid xdebug binary? xdebug.org/wizard.phpzulus

4 Answers

2
votes

I had the same problem, and the problem was that I had moved my Firefox installation folder. Check what browser you have set in Window->Preferences->General->Web Browser. If you are using an external browser, click on it, then click on Edit and check if the path to the browser is correct.

2
votes

Thank you both zulus and axxis for your comments!

Here is the steps to achieve the resolution.

1) Go to http://xdebug.org/wizard.php

2) Construct the following phpinfo in your webserver script and run it directly in a browser.

<?php
    phpinfo();
?>

3) Highlight the entire page or press (ctrl + a) the contents of the html page (not the page html source code) into the page referenced in step 1.

4) Final screen shot shows the file to download (pointed to by big arrow) and the path (enclosed by rectangle).

phpinfo

xdebug phpinfo dump

xdebug phpinfo result

The problem was solved by placing the downloaded php_xdebug-2.3.2-5.5-vc11-x86_64.dll file into 1) and not 2).

1) C:\wamp\bin\php\php5.5.12\ext

2) C:\wamp\bin\php\php5.5.12\zend_ext

1
votes

For me,

[xdebug]
xdebug.remote_enable=1
xdebug.remote_host=< hostname >
xdebug.remote_port=< port >
xdebug.remote_handler="dbgp"
zend_extension_ts=< xdebug library location >

this worked, inserted in specific virtual-site php.ini, not /etc/php.ini. Helper how-to: this

< hostname > the ip of the machine running the IDE
1
votes

For me, adding the [xdebug] configurations suggested by others to a php.ini file kept in following path C:\wamp64\bin\apache\apache2.4.23\bin helped. Essentially it's a symbolic link that points/links to phpForApache.ini file under your respective php version folder that gets installed with wamp64 e.g. php5.6.25.

In nutshell, adding following lines to phpForApache.ini to helped me -

zend_extension = c:\wamp64\bin\php\php5.6.25\ext\php_xdebug-2.5.1-5.6-vc11-x86_64.dll
xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"

Hope this helps