KEMBAR78
Xdebug as a Drupal debugging tool | PDF
Xdebug as a Drupal
debugging tool
Drupal Moldova / Meet-up #9 / 26.02.2015
Xdebug
● Debugger and Profiler Tool for PHP
● PHP extension
● Xdebug 2.3.1 - 24.02.2015
Install
● apt-get install php5-dev
● (or) apt-get install php5-xdebug
● edit /etc/php5/apache2/php.ini
● add zend_extension="/<path>/xdebug.so"
Advanced config
[XDebug]
zend_extension="/<path>/xdebug.so"
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir=/tmp
IDE #phpStorm
● https://www.youtube.com/watch?v=TzJex4AkDas
Another tools
● debug() - core
● dpq() - SQL string
● dpm() - krumo
● dvm() - var_dump()
● dpr() - no krumo
● kpr() - krumo !message()
● dargs()
● …
Bibliography
● http://xdebug.org/docs/install
● https://www.jetbrains.com/phpstorm/help/configuring-xdebug.html
● https://api.drupal.org/api/devel/devel.module/function/dpq/8
● https://api.drupal.org/api/drupal/core%21includes%21common.
inc/function/debug/8
● https://www.drupal.org/project/nicedpq
● http://ratatosk.net/drupal/tutorials/debugging-drupal.html

Xdebug as a Drupal debugging tool