War es wirklich?

  • login
  • kontakt
Startseite › Weblogs › cs's blog

PHP debugging and profiling with xdebug

On Debian:

apt-get install php5-xdebug kcachegrind

Having the xdebug module around will already provide better debugging output in case of fatal errors and uncaught exceptions. The output can still be tweaked though:

In /etc/php5/conf.d/xdebug.ini, below the zend_extension line, add the following:
xdebug.var_display_max_children = 512
xdebug.var_display_max_data = 2048
xdebug.var_display_max_depth = 10

For profiling, add:
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = /my/desired/outputdir

Create the directory configured on the xdebug.profiler_output_dir line and make it writable for the webserver user (www-data). Profiling data will be written to that dir (keep an eye on the amount of data produced though -- you may want to switch it off when you're not profiling!). kcachegrind is a great tool for vizualizing the data.

Docs: http://www.xdebug.org/docs/

Trackback URL for this post:

http://ich.war-es-wirklich.net/trackback/263
  • Debugging
  • PHP
  • Tipps und Tricks
  • Xdebug
  • Englisch
  • cs's blog
  • Neuen Kommentar schreiben

Suchen

Themenwolke

Biologie Dokumentation Drupal Gesellschaft Git Ich will das nie wieder suchen müssen Internet IT IT-Sicherheit JavaScript jobpilot KDE Kryptographie Linux Mensch Monster MySQL Netzwerkzeug Open-Source-Software PHP Politik Psychologie Software Software-Entwicklung Spaß und Satire Tipps und Tricks Versionskontrolle Web-Entwicklung WTF Überwachung
Weitere Themen

OpenSource-Scores

Ohloh

Ohloh profile for cspitzlay

Drupal: Certified to rock

Yes I am
  • login
  • kontakt