xdebug on Debian

Installation:

sudo apt-get install php5-xdebug

Can check whethere it installed or not by looking at phpinfo()

We can change any initial configuration settings by changing xdebug specific ini

files located at /etc/php5/fpm/conf.d/20-xdebug.ini

Can find the exact ini location by looking at the phpinfo()

OR just run find command from command line,

find /etc -name "xdebug.ini"

Profiling:

Need to change xdebug.ini file as follow,

xdebug.profiler_enable = On
xdebug.profiler_output_dir="/tmp/xdebug"

More info at: http://devzone.zend.com/1139/profiling-php-applications-with-xdebug/

Debug codes with break points:

Netbeans 8 comes with native support with xdebug. The following config needs to be done on xdebug.ini or set it on run time,

xdebug.remote_connect_back = On

So, the final configuration changes as bellow,

xdebug.remote_enable = On
xdebug.profiler_enable = On
xdebug.profiler_output_dir = "/tmp/xdebug"
xdebug.dump_undefined = On
xdebug.remote_connect_back = On

Popular posts from this blog

Kubernetes for Micro Services

Laravel 5.3

Node-RED