xDebug PHP CLI Applications in Eclipse

I have some phpunit test cases which I need to debug in my eclipse .
I’m trying to explain the debugging setup in the following situation

  • Run PHPUnit from Command Line
  • Debug from eclipse

Step 1 :  Install xDebug

more comprehensive guide to install xDebug is here https://xdebug.org/docs/install

Step 2 : php.ini Settings

[XDEBUG]
zend_extension = fullpathtoxdebugextension
xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.remote_autostart=On

Step 3 : Eclipse Setup

      Set up as the highlighted fields in below screenshots

Step 3.1 : Setup PHP and xDebug executables

php-eclipse-setup1

 

Step 3.2 : setup Debug

php-xdebug-eclipse2

 

php-xdebug-eclipse3

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s