Debug php scripts with eclipse and xdebug on windows



First,get suitable .dll file.

Tailored Installation Instructions

Paste the full output of phpinfo() to the textarea and submit the form.Then follow the output instructions,including download php_xdebug-x…x.dll file;move the downloaded file to path\to\php\extention;add zend_extension = “path\to\xdebug\file” to php.ini file and restart the webserver.

Second,modify php.ini file.Append following contents to php.ini file :

[XDebug]
xdebug.remote_enable = true
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "ip_address_of_server_running_scripts"
xdebug.remote_port = 9000
xdebug.remote_autostart = 1

Output phpinfo() and check if infomation like with Xdebug vx.x.x, Copyright (c) 2002-2014, by Derick Rethans is displayed.And also there’s section named xdebug.Such information proves that the downloaded php_xdebug-x…x.dll file is available.

Third,configure the eclipse.

  • Select browser in General > Web Browser

  • Select XDebug in PHP > Debug

  • Check WorkBench Options in PHP > Debug > WorkBench Options

  • Add a php server in PHP > PHP Servers

  • Click New,input Name and URL

  • Click next and configure server path mapping

  • Run > Debug Configrations

  • Click Debug