eclipse xdebug session never completes

I had this problem too and I was missing this line in the php.ini file:

xdebug.remote_enable = On

Make sure you defined zend_extention with ABSOLUTE path in the php.ini:

e.g.: zend_extension=D:\SANDBOX\server\php\php_xdebug-2.1.0-5.3-vc6.dll

I'm debugging a local project on Windows. So far I did not need xdebug.remote_enable = On.

Suggestions if the Xdebug session does not start (hangs at 57 %), make sure that:

  • zend_extention directive is set with absolute path and the debug is loaded, use phpinfo() to check
  • firewall does not block the default 9000 port or Eclipse.
  • another application is not using the port (execute: netstat -an |find /i "listening" from the command line)

If you need to setup a different port use in php.ini:

xdebug.remote_enable = on
xdebug.remote_port = XXXX 

and correct the Xdebug settings in Eclipse:

XDEBUG settings in Eclipse


I had the same problem and I fixed it by changing the port to XDebug (now using port 9001).

Here is my php.ini content:

zend_extension ="C:\...\EasyPHP-5.3.3\php\ext\php_xdebug-2.dll"
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9001
xdebug.remote_handler=dbgp
xdebug.profiler_enable=0
xdebug.remote_mode=req
xdebug.remote_autostart=0

Also check the apache log file and make sure that you don't have the following Warning message:

PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0

If you do, open the php.ini file and comment with a ';' the extension=php_xdebug-2.dll line:

;extension=php_xmlrpc.dll
extension=php_xsl.dll
**;extension=php_xdebug-2.dll**
;/PHPExt

After fighting for 3 hours and trying out every solution on forums, I found out that the simple trick was to remove the quotes while specifying the path of the Xdebug dll in zend_extension in php.ini. I am using XAMPP (PHP 5.3.6 + Apache 2.2)+ Eclipse Indigo + PDT + Xdebug 2.1.2 on Windows Vista.

Here is the exact configuration that worked for me -

zend_extension=C:\xampp\php\ext\php_xdebug-2.1.2-5.3-vc6.dll
#Note that the path above is not in quotes
xdebug.remote_enable=true
xdebug.remote_host=localhost
xdebug.remote_port=9001
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir=C:\xampp\tmp

I have used port 9001 so that it does not clash with 9000 in case that's already used by another program. Make sure this matches the port in Eclipse > Preferences > PHP > Debug > Xdebug too. Also, restart apache after editing php.ini.

Once I added this to php.ini, everything worked like ice cream.


I had the same problem with Zend Studio. I have noticed that the xdebug session was not starting properly. I passed this string to the url once and it worked since then.

http://localhost/myalias/?XDEBUG_SESSION_START=ECLIPSE_DBGP&KEY=13750956767461

I'm sure it's a matter of configuration somewhere in the IDE.